Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-07-2005, 04:11 PM   PM User | #1
ChaS3
New to the CF scene

 
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
ChaS3 is an unknown quantity at this point
Question Javascript Menu Placement On Webpage

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.
ChaS3 is offline   Reply With Quote
Old 03-07-2005, 05:45 PM   PM User | #2
requestcode
Regular Coder

 
Join Date: Jun 2002
Posts: 626
Thanks: 0
Thanked 0 Times in 0 Posts
requestcode is an unknown quantity at this point
You might take a look at this script to see how they accomplished it.
http://www.javascriptkit.com/script/...aticmenu.shtml
requestcode is offline   Reply With Quote
Old 03-07-2005, 06:07 PM   PM User | #3
ChaS3
New to the CF scene

 
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
ChaS3 is an unknown quantity at this point
Cool

I placed this code into the body of my page:

Code:
<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?
ChaS3 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:59 PM.


Advertisement
Log in to turn off these ads.