The script should dynamically do this already if there isn't enough room below the anchor link to drop down fully. I reckon you wish to add the option of manually forcing the menu to drop up. If so, find the line:
Code:
function dropdownmenu(obj, e, menucontents, menuwidth){
and change that to:
Code:
function dropdownmenu(obj, e, menucontents, menuwidth, dropupBool){
Then find the line:
Code:
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
and change that to:
Code:
if (dropupBool==true)
dropmenuobj.style.top=dropmenuobj.y-dropmenuobj.offsetHeight+"px"
else
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
Then, in your HTML, to force a menu to drop down, just populate the optional 5th parameter with "true":
Code:
<a href="default.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu1, '150px', true)" onMouseout="delayhidemenu()">Web Design</a>
Bookmarks