phentalmyst
Programmer
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="javascript">
<!--
var timer = 0
function loopUp(){
timer = setTimeout("initUp()", 100);
}
function loopDown(){
timer = setTimeout("initDown()", 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="#003366">
<div id="nav" style="position:absolute; top:50; left:700; width:20; height:20; visibility:show">
<table border="0" cellpadding="0" cellspacing="0" width="20">
<tr>
<td><font face="Verdana" size="2"><a href="#" onMouseOver="initUp()" onMouseOut="clearTimeout(timer)">up</a></font></td>
</tr>
<tr>
<td><font face="Verdana" size="2"><br><a href="#" onMouseOver="initDown()" onMouseOut="clearTimeout(timer)">down</a></font></td>
</tr>
</table>
</div>
<div id="bg" style="position:absolute; top:50; left:300; width:350; height:200; visibility:show">
<table border="0" cellpadding="0" cellspacing="0" width="350" height="200">
<tr>
<td bgcolor="#FFFFFF"> </td>
</tr>
</table>
</div>
<div id="body" style="position:absolute; top:50; left:300; width:350; height:200; overflow:hidden; visibility:show">
<div id="copy" style="position:absolute; visibility:show">
<table border="0" cellpadding="0" cellspacing="0" width="350">
<tr>
<td><font size="2" face="Verdana">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!
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="javascript">
<!--
var timer = 0
function loopUp(){
timer = setTimeout("initUp()", 100);
}
function loopDown(){
timer = setTimeout("initDown()", 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="#003366">
<div id="nav" style="position:absolute; top:50; left:700; width:20; height:20; visibility:show">
<table border="0" cellpadding="0" cellspacing="0" width="20">
<tr>
<td><font face="Verdana" size="2"><a href="#" onMouseOver="initUp()" onMouseOut="clearTimeout(timer)">up</a></font></td>
</tr>
<tr>
<td><font face="Verdana" size="2"><br><a href="#" onMouseOver="initDown()" onMouseOut="clearTimeout(timer)">down</a></font></td>
</tr>
</table>
</div>
<div id="bg" style="position:absolute; top:50; left:300; width:350; height:200; visibility:show">
<table border="0" cellpadding="0" cellspacing="0" width="350" height="200">
<tr>
<td bgcolor="#FFFFFF"> </td>
</tr>
</table>
</div>
<div id="body" style="position:absolute; top:50; left:300; width:350; height:200; overflow:hidden; visibility:show">
<div id="copy" style="position:absolute; visibility:show">
<table border="0" cellpadding="0" cellspacing="0" width="350">
<tr>
<td><font size="2" face="Verdana">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!