Linus60
08-20-2002, 04:34 AM
I recently downloaded the (above) "menu scrolling" script I want to use in my web pages. Now I have a little problem. I want the menu to be displayed in a specific place of the web page/screen before starting the scroll. I set the "px" values of the "left" and "top" options between the <DIV></DIV> tags. But this change only allow me to change the "left" position of the menu on the screen but not the "top" one. Infact even if I modify the "top" px value the menu is always displayed on top of the web page/screen close to its margin. Why? Can you please tell me how can I modify the script to finally place the menu in the start position I need? As you probably understand I'm a neophite with scripts. Please give me a little help.
Thanks in advance.
--------------------------
3 parts to this script
=================================================
part 1
=================================================
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function setVariables() {
if (navigator.appName == "Netscape") {
v=".top=";
dS="document.";
sD="";
y="window.pageYOffset";
}
else {
v=".pixelTop=";
dS="";
sD=".style";
y="document.body.scrollTop";
}
}
function checkLocation() {
object="object1";
yy=eval(y);
eval(dS+object+sD+v+yy);
setTimeout("checkLocation()",10);
}
// End -->
</script>
=======================================================
Part 2
=======================================================
<!-- A1 --><BODY OnLoad="setVariables();checkLocation()"><!-- -->
=======================================================
part 3
=======================================================
<!--A1 --><div id="object1" style="position:absolute; visibility:show; left:0px; top:0px; z-index:2">
<table width=130 border=0 cellspacing=5 cellpadding=0>
<tr>
<td>Menu Bar</td>
</tr>
<tr>
<td><a href="http://www.123webmaster.com" >123webmaster</a></td>
</tr>
<tr>
<td><a href="http://www.a1javascripts.com" >A1 Javascripts</a></td>
</tr>
<tr>
<td><a href="http://www.free-clip-art-images.com" >Free-Clip-Art-Images</a></td>
</tr>
<tr>
<td><a href="http://www.freewarefiles.com" >Freeware Files</a></td>
</tr>
<tr>
<td><a href="http://www.httpcity.com" >Http City</a></td>
</tr>
</table>
</div><!-- -->
Thanks in advance.
--------------------------
3 parts to this script
=================================================
part 1
=================================================
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function setVariables() {
if (navigator.appName == "Netscape") {
v=".top=";
dS="document.";
sD="";
y="window.pageYOffset";
}
else {
v=".pixelTop=";
dS="";
sD=".style";
y="document.body.scrollTop";
}
}
function checkLocation() {
object="object1";
yy=eval(y);
eval(dS+object+sD+v+yy);
setTimeout("checkLocation()",10);
}
// End -->
</script>
=======================================================
Part 2
=======================================================
<!-- A1 --><BODY OnLoad="setVariables();checkLocation()"><!-- -->
=======================================================
part 3
=======================================================
<!--A1 --><div id="object1" style="position:absolute; visibility:show; left:0px; top:0px; z-index:2">
<table width=130 border=0 cellspacing=5 cellpadding=0>
<tr>
<td>Menu Bar</td>
</tr>
<tr>
<td><a href="http://www.123webmaster.com" >123webmaster</a></td>
</tr>
<tr>
<td><a href="http://www.a1javascripts.com" >A1 Javascripts</a></td>
</tr>
<tr>
<td><a href="http://www.free-clip-art-images.com" >Free-Clip-Art-Images</a></td>
</tr>
<tr>
<td><a href="http://www.freewarefiles.com" >Freeware Files</a></td>
</tr>
<tr>
<td><a href="http://www.httpcity.com" >Http City</a></td>
</tr>
</table>
</div><!-- -->