Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to hide a pop-up menu

Status
Not open for further replies.

deca

Programmer
Dec 20, 2002
12
0
0
GB
Hi!<br><br>I've got a pop-up menu, built with a layer.<br>I would like to hide it when the user clicks on the page, somewhere out of the layer.<br><br>How can I do this?<br><br>Thanks and bye! <br><br>DeCa
 
Just reference the layer and if its ie say layer.style.visibility=&quot;hidden&quot;...netscape has a similar way of doing it, I think you can just say hide() or some such nonsense...<br><br><br><A HREF="mailto:jared@aauser.com">jared@aauser.com</A>
 
I've tryed your solution, but I can use it only with a link, like this:<br>&lt;a href=&quot;javascript:hideLayer()&quot;&gt;Close the window&lt;/a&gt;<br><br>But, if I do this, for example:<br>window.onFocus=&quot;javascript:hideLayer()&quot;;<br>it doesn't function.<br><br>How can I do?<br><br>Bye!<br>DeCa
 
There is a way to detect where the user clicked (either by actual coordinates, or by detecting what html tag the mouse was over) I am not sure how to do this, but I know that it can be done. check out <A HREF=" TARGET="_new"> they usually have that kind of stuff. <p>theEclipse<br><a href=mailto:eclipse_web@hotmail.com>eclipse_web@hotmail.com</a><br><a href=robacarp.webjump.com>robacarp.webjump.com</a><br>**-Trying to build a documentation of a Javascript DOM, crossbrowser, of course. E-mail me if you know of any little known events and/or methods, etc.
 
Thanks very much, now everything is perfect! :)<br><br>Thanks and Bye!<br><br>DeCa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top