Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

referencing nested DIVs in netscape

Status
Not open for further replies.

phentalmyst

Programmer
Jan 30, 2001
18
0
0
US
hello folks,

im writing some code that references a nested div, and the app works fine in IE, but netscape doesnt find the layer.

here's my code:

<html>

<head>
<title>New Page 1</title>
<script language=&quot;javascript&quot;>
<!--

var timer = 0
function loopUp(){
timer = setTimeout(&quot;initUp()&quot;, 100);
}

function loopDown(){
timer = setTimeout(&quot;initDown()&quot;, 100);
}

function clearTimer(){
timer = 0;
}

var newtop = 0
var move = 5
function scrollUp(){
if(document.layers){document.layers['copy'].top = move + newtop;}
else {document.all['copy'].style.top = move + newtop;}
newtop = newtop + move;
}

function scrollDown(){
if(document.layers){document.layers['copy'].top = newtop - move;}
else {document.all['copy'].style.top = newtop - move;}
newtop = newtop - move;
}

function initUp(){
scrollUp();
loopUp();
}

function initDown(){
scrollDown();
loopDown();
}

//-->
</script>
</head>

<body bgcolor=&quot;#003366&quot;>

<div id=&quot;nav&quot; style=&quot;position:absolute; top:50; left:700; width:20; height:20; visibility:show&quot;>
<table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;20&quot;>
<tr>
<td><font face=&quot;Verdana&quot; size=&quot;2&quot;><a href=&quot;#&quot; onMouseOver=&quot;initUp()&quot; onMouseOut=&quot;clearTimeout(timer)&quot;>up</a></font></td>
</tr>
<tr>
<td><font face=&quot;Verdana&quot; size=&quot;2&quot;><br><a href=&quot;#&quot; onMouseOver=&quot;initDown()&quot; onMouseOut=&quot;clearTimeout(timer)&quot;>down</a></font></td>
</tr>
</table>
</div>

<div id=&quot;bg&quot; style=&quot;position:absolute; top:50; left:300; width:350; height:200; visibility:show&quot;>
<table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;350&quot; height=&quot;200&quot;>
<tr>
<td bgcolor=&quot;#FFFFFF&quot;>&nbsp;</td>
</tr>
</table>
</div>

<div id=&quot;body&quot; style=&quot;position:absolute; top:50; left:300; width:350; height:200; overflow:hidden; visibility:show&quot;>
<div id=&quot;copy&quot; style=&quot;position:absolute; visibility:show&quot;>
<table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;350&quot;>
<tr>
<td><font size=&quot;2&quot; face=&quot;Verdana&quot;>Lorem ipsum dolor sit amet, consectetuer adipiscing elit,
sed diem nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam
erat volutpat. Ut wisis enim ad minim veniam, quis nostrud exerci tution
ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.
Duis te feugifacilisi. Duis autem dolor in hendrerit in vulputate velit
esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at
vero eros et accumsan et iusto odio dignissim qui blandit praesent
luptatum zzril delenit au gue duis dolore te feugat nulla facilisi.</font>
</td>
</tr>
</table>
</div>
</div>


</body>

</html>




any suggestions???

thanks!



 
Nevermind guys, i figured it out. i didnt know netscape saw layers has having their own documents inside themselves. phew!

:D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top