SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Addict
    Join Date
    Nov 2000
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Static Drop Down Menu

    Hi,
    I've been playing around with HierMenu (http://www.webreference.com/dhtml/) and as I couldn't use it on a different frame I thought I would try and use some other script to make it static....But hey! I've not been able to and need some help if possible?

    Has anyone used HierMenu? and if so do you know if there is a way to keep it static on the page as you scroll down?

    Thank you!

  2. #2
    Spam Can Kill!!! Disk-t's Avatar
    Join Date
    Jul 2001
    Location
    n/a
    Posts
    214
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just go to http://www.dynamicdrive.com and pick a navigation system from there.

  3. #3
    SitePoint Addict
    Join Date
    Nov 2000
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Drop Down Menu

    Thanks but none of the ones there will fit into my design.

    I know what I need to do and that is to learn how to write my own javascripts, but hey! I don't have a lot of time so all I can do at the moment is try and get help from others and customise scripts that I download.

    If any one can 'help' thank you.

  4. #4
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Tezdread,

    I am not familiar with Heirmenu. However, if you want to make it static, the script below might work. It should be called from the onLoad event handler -- onLoad="init('nameOfDiv')". Simply replace 'nameOfDiv' with the name of your menu's main div.


    Vinny
    <script language="javascript">
    <!--
    var oldY=0;

    function scrollDiv(divID)
    {
    var yPos = (document.all || document.getElementById) ? document.body.scrollTop : window.pageYOffset;

    var divStyle = (document.getElementById) ? document.getElementById(divID).style : ( (document.all) ? document.all[divID].style : document.layers[divID] );

    if (yPos != oldY)
    {
    divStyle.top = yPos;
    oldY = yPos;
    }
    }

    function init(divID)
    {
    scrollDiv(divID);
    setTimeout("init('"+ divID + "')", 60);
    }
    </script>
    Where the World Once Stood
    the blades of grass
    cut me still

  5. #5
    SitePoint Addict
    Join Date
    Nov 2000
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Menu

    Hi Vinny and thank you for your help, unfortunately the script would not work. The problem with the HierMenu is there are two .js files one being a loader and also the location of the menu has to be specified within the .js file.

    I tried using layers also but none of this would work. The only thing I could do was to use an anchor point before the script so that I could have links down the page to take me directly to the menu.

    Thanks again
    Tezdread


Bookmarks

Posting Permissions

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