...

View Full Version : Javascript Menu Placement On Webpage



ChaS3
03-07-2005, 04:11 PM
Is there a way to stick my javascript calls to a menu such as :

Code:
<script type='text/javascript'>function Go(){return}</script>
<script type='text/javascript' src='coils.js'></script>
<script type='text/javascript' src='ersemenu_com.js'></script>

inside layer tags to keep the menu visible at all times while a user scrolls down the page? I have the background image set to Fixed so the user can scroll down the page and the background stays constant and does not move, however the menu located on the side scrolls along with the page making it invisble after the user scrolls so far down the page, I do not want to use frames for this page.

requestcode
03-07-2005, 05:45 PM
You might take a look at this script to see how they accomplished it.
http://www.javascriptkit.com/script/script2/staticmenu.shtml

ChaS3
03-07-2005, 06:07 PM
I placed this code into the body of my page:



<SCRIPT LANGUAGE="JavaScript">

/*
Created by Randy Bennet http://home.thezone.net/~rbennett/utility/javahead.htm
Featured on JavaScript Kit (http://javascriptkit.com)
For this and over 400+ free scripts, visit http://javascriptkit.com
*/

function setVariables() {
if (document.layers) {
v=".top=";
dS="document.";
sD="";
y="window.pageYOffset";
}
else if (document.all){
v=".pixelTop=";
dS="";
sD=".style";
y="document.body.scrollTop";
}
else if (document.getElementById){
y="window.pageYOffset";
}
}
function checkLocation() {
object="object1";
yy=eval(y);
if (document.getElementById)
document.getElementById("object1").style.top=yy
else
eval(dS+object+sD+v+yy)
setTimeout("checkLocation()",10);
}
</script>

<div id="object1" style="position:absolute; visibility:show; left:0px; top:0px; z-index:5">

<table width=150 border=0 cellspacing=20 cellpadding=0 >
<script type='text/javascript'>function Go(){return}</script>
<script type='text/javascript' src='coils.js'></script>
<script type='text/javascript' src='ersemenu_com.js'></script>
</table>
</div>
<BODY OnLoad="setVariables();checkLocation()">



I replaced his built menu with my calls to my javascript menu, however it dosnt work. Any ideas?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum