Static Drop Down Menu
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?
Just go to http://www.dynamicdrive.com and pick a navigation system from there.:rolleyes:
Drop Down Menu
Thanks but none of the ones there will fit into my design.
If any one can 'help' thank you.
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.
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;
setTimeout("init('"+ divID + "')", 60);
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.