javascript failing in Safari

D

drew197

I am a newbie to javascript. I am editing someone else's code to make
it work in in Safari and Mozilla. I got it to work in Mozilla, but I
can't get it to work in Safari. I have placed an alert after this line
and it comes up in Mozilla but not in Safari. Does anyone see a reason
why this fails in Safari?

document.write("<div id='orbitLayer' style='position:absolute;
left:0px; top:"+document.all['topBanner'].offsetWidth+"px;
width:"+document.all['topBanner'].offsetWidth+"px;
height:"+(document.body.offsetHeight-document.all['topBanner'].offsetHeight)+"px;
z-index:2>");

Thanks ahead of time,
Drew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,783
Latest member
RickeyDort

Latest Threads

Top