Sure. Firstly, if you wish to change the behavior from revealing the Drop Down content onMouseover to onClick instead, remove the below three lines in gray and replace them with the new line in red instead:
Code:
anchorobj.onmouseover=function(e){dropdowncontent.show(this, subobj, e)}
anchorobj.onmouseout=function(e){dropdowncontent.hide(subobj, subobj, e)}
if (this.disableanchorlink) anchorobj.onclick=function(){return false}
anchorobj.onclick=function(e){dropdowncontent.show(this, subobj, e); return false}
If you wish to disable the Drop Down Content from disappearing when the mouse rolls out of it, remove the below line:
Code:
subobj.onmouseout=function(e){dropdowncontent.hide(this, subobj, e)}
With this disabled, you'll want to add a link inside the Drop Down content to manually hide it. Just set the content's visibility to "hidden" somehow. For example:
Code:
<DIV id="subcontent" style="position:absolute; visibility: hidden; border: 9px solid orange; background-color: white; width: 300px; padding: 8px;">
<p><b>Search Dynamic Drive:</b></p>
<form method="get" action="http://search.freefind.com/find.html" id="topform">
<input name="query" maxlength="255" style="width: 150px" id="topsearchbox" alt="Search" />
<input value="Search" class="topformbutton" type="submit" />
</form>
<div align="right"><a href="http://www.dynamicdrive.com">Dynamic Drive</a></div>
<a href="#" onClick="document.getElementById('subcontent').style.visibility='hidden'; return false">Hide Content</a>
</DIV>
Bookmarks