Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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.

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Posts
    626
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You might take a look at this script to see how they accomplished it.
    http://www.javascriptkit.com/script/...aticmenu.shtml

  • #3
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •