lukeduncalfe
Technical User
hi,
i've got a problem that has perplexed me for a long time!
background:
i've written some code that positions a transparent flash file (.swf) in a css layer overtop of an html page. then there's some javascript that keeps the layer in the same place on the screen even when you scroll down (works a bit like a watermark).
i'm wanting people to be able to include this snippet of code into their own html to have this flash movie appear overtop of their page, so i'm wanting to package the code as attractively as possible in a .js file, so all people will have to add is a <script src=""></script> tag to add the code.
here's the problem:
i've managed to get the javascript side of the code successfully into a .js file, but i can't seem to get that css using document.writes! even though logically it should work (one supposes). the css i'm trying to include is:
<div id=interlayer
style=position:absolute;width:'100%';height:'100%';z-index:100;left:1px;top:1px><OBJECT
classid=clsid
27CDB6E-AE6D-11cf-96B8-444553540000 WIDTH=100% HEIGHT=100% id=x ALIGN=top><PARAM NAME=movie
VALUE= NAME=menu VALUE=false><PARAM NAME=quality VALUE=best><PARAM NAME=scale VALUE=exactfit><PARAM NAME=salign VALUE=T><PARAM NAME=wmode VALUE=transparent></OBJECT></div>
which is at the moment followed by the javascript in a .js file:
<script language="javascript" src="
i'd prefer the two to go in the same file, but even two .js files, one with the css and one with the javascript would be great.
if anyone manages to get the css working in a .js file they will be able to tell because on a pc running ie a large red x will appear on screen. try it by putting it in just the html
any help would be appreciated,
luke
i've got a problem that has perplexed me for a long time!
background:
i've written some code that positions a transparent flash file (.swf) in a css layer overtop of an html page. then there's some javascript that keeps the layer in the same place on the screen even when you scroll down (works a bit like a watermark).
i'm wanting people to be able to include this snippet of code into their own html to have this flash movie appear overtop of their page, so i'm wanting to package the code as attractively as possible in a .js file, so all people will have to add is a <script src=""></script> tag to add the code.
here's the problem:
i've managed to get the javascript side of the code successfully into a .js file, but i can't seem to get that css using document.writes! even though logically it should work (one supposes). the css i'm trying to include is:
<div id=interlayer
style=position:absolute;width:'100%';height:'100%';z-index:100;left:1px;top:1px><OBJECT
classid=clsid
VALUE= NAME=menu VALUE=false><PARAM NAME=quality VALUE=best><PARAM NAME=scale VALUE=exactfit><PARAM NAME=salign VALUE=T><PARAM NAME=wmode VALUE=transparent></OBJECT></div>
which is at the moment followed by the javascript in a .js file:
<script language="javascript" src="
i'd prefer the two to go in the same file, but even two .js files, one with the css and one with the javascript would be great.
if anyone manages to get the css working in a .js file they will be able to tell because on a pc running ie a large red x will appear on screen. try it by putting it in just the html
any help would be appreciated,
luke