Rob: Thanks for your reply and reference to quirksmode. Here's the code
I'm using. Perhaps you can see where the problem lies. I have tried
this within a "normal" page and a test page that has no other html
code-- with the same result, namely that the banner text appears at 0,0.
This, of course, is when I call the code with <script
"src=filename.js"></script>. When the javascript is in the html doc, it
works fine.
document.write(" <!-- new script: static slider -->")
document.write("<div id='staticbanner' style='position:absolute;'>")
document.write("<a href='linkpage.htm?adslider'
target=_blank>BannerText</a>")
document.write(" </div>")
document.write(" <script>")
document.write(" //define universal reference to
'staticbanner'")
document.write(" var crossobj=document.all?
document.all.staticbanner :")
document.write(" document.getElementById?")
document.write("
document.getElementById('staticbanner') :")
document.write(" document.staticbanner")
document.write(" function positionit(){")
document.write(" //define universal dsoc left point")
document.write(" pageXOffset")
document.write(" //define universal dsoc top point")
document.write(" var dsoctop=document.all?
document.body.scrollTop :")
document.write(" pageYOffset")
document.write(" //define universal browser window
width")
document.write(" var window_width=document.all?
document.body.clientWidth")
document.write(" : window.innerWidth")
document.write(" //if the user is using IE 4+ or NS6+")
document.write(" if
(document.all||document.getElementById){")
document.write("
crossobj.style.left=parseInt(dsocleft)+")
document.write(" parseInt(window_width)-70")
document.write(" crossobj.style.top=dsoctop+120")
document.write(" }")
document.write(" //else if the user is using NS 4")
document.write(" else if (document.layers){")
document.write(" crossobj.left=")
document.write(" dsocleft+window_width-60 ")
document.write(" crossobj.top=dsoctop+130 ")
document.write(" }")
document.write(" }")
document.write(" setInterval('positionit()',200)")
document.write(" </script>")
*** Sent via Developersdex
http://www.developersdex.com ***