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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select tags in layers problem...

Status
Not open for further replies.

daveyboi

Programmer
Oct 22, 2002
4
GB
Hi, i have some absolute positioned draggable layers on a page, they contain controls for changing the page properties, bgColor. fgColor etc....

The layers display property is set to none onmouseout, which is fine.. however, the problem is - they contain the <select> tag, and once you mouseover the options in the select tag, it acts as if it's not part of the span and the layer is hidden. Is the a way around this?

It's for IE only, Cheers.

Here's a quick example:

Code:
<html>
<body>
<span style=&quot;padding: 20px; width: 200px; height: 200px; background-color: #ccc; border: 1px solid #000; position: absolute; top: 15px; left: 15px;&quot; onMouseLeave=&quot;this.style.display = 'none';&quot;>
<select>
<option>optOne
<option>optTwo
<option>optThree
</select>
</span>
</body>
</html>
 
Here is one solution that works but not pretty good (the span doesn't disapears when mouse is over select but disapears when over dropdown box) :
Code:
<html>
<body>
<span id=&quot;mySpan&quot; style=&quot;padding: 20px; width: 200px; height: 200px; background-color: #ccc; border: 1px solid #000; position: absolute; top: 15px; left: 15px;&quot; onmouseout=&quot;this.style.display = 'none';&quot;>
<select ID=&quot;Select1&quot; NAME=&quot;Select1&quot; onmouseover=&quot;document.getElementById('mySpan').style.display = 'block';&quot;>
<option>optOne</option>
<option>optTwo</option>
<option>optThree</option>
</select>
</span>
</body>
</html>
Water is not bad as long as it stays out human body ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top