PDA

View Full Version : Anylink Drop Down Menu



Alex ZG
03-21-2006, 04:10 PM
http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm

Hi there I was wondering if it was possible to invert the drop down so that on mouse over the menu goes up instead of down thanks

Twey
03-21-2006, 04:32 PM
<a href="default.htm" onClick="return clickreturnvalue()" onmouseout="dropdownmenu(this, event, menu1, '150px')" onmouseover="delayhidemenu()">Web Design</a> |

jscheuer1
03-22-2006, 05:09 AM
I think Alex ZG means make the drop down a drop up (above the triggering link). Do you, Alex ZG? It already will do that if the trigger is too close to the bottom of the page (from function clearbrowseredge(obj, whichedge), near that function's end):


if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}

Find the above code and change it to (remove all red parts from the above, including the trailing bracket):


edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge

bsheets
03-22-2006, 02:34 PM
Hi, new to this site so hope this post isn't in the wrong spot.
New to java too. I've been trying to 'outsource' my website code so I can change things in one place and have it changed on all relevant pages at the same time - like if I add a menu selection. I used the Any Link Drop Down Menu code which works well but not if the menu bar I have for the site is in document.writeln('

If I add the two to the same script it says it "expects )" and if I have them separately it doesn't read it at all.

Not too good at explaining myself, hope that made sense. If it doesn't let me know and I'll try and clarify.

Thanks for reading!
e

Alex ZG
06-01-2006, 04:09 PM
Thanks so much John it works like a charm,
sorry i didn't respond earlier!

Thanks again

Twey
06-01-2006, 04:20 PM
It doesn't. :)

jscheuer1
06-01-2006, 05:39 PM
It doesn't. :)
What doesn't what? :confused:

Twey
06-01-2006, 06:00 PM
Not too good at explaining myself, hope that made sense. If it doesn't let me know and I'll try and clarify.That :)

jscheuer1
06-01-2006, 06:55 PM
Originally Posted by bsheets
Not too good at explaining myself, hope that made sense. If it doesn't let me know and I'll try and clarify.That :)

Me either. :)

Except that it sounds like malformed document.writeln('string') method to me.