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

Javascript to hide a list box 1

Status
Not open for further replies.

gojohnnygogogogo

Programmer
May 22, 2002
161
GB
Hello,

how can I do this ,
onmouseover listbox caled [3D] is visable ,
but when mouseout the listbox is invisable . ?

any help would be great.
thanks.
 
Heres some examples, paste them into a file and run it in the browser:
Code:
<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;>
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME=&quot;Generator&quot; CONTENT=&quot;EditPlus&quot;>
<META NAME=&quot;Author&quot; CONTENT=&quot;&quot;>
<META NAME=&quot;Keywords&quot; CONTENT=&quot;&quot;>
<META NAME=&quot;Description&quot; CONTENT=&quot;&quot;>
</HEAD>

<BODY>
1) Disappearing box that can't fire a mouseover event (starts visible as example):<br>
<select name=&quot;whatever&quot; onMouseOver=&quot;this.style.visibility='visible';&quot; onMouseOut=&quot;this.style.visibility='hidden';&quot;>
<option> A
<option> B
<option> C
</select><br>
2) Disappearing, Reappearing select box by using a div:<br>
<div onMouseOver=&quot;this.children[0].style.visibility='visible';&quot; onMouseOut=&quot;this.children[0].style.visibility='hidden';&quot;><select name=&quot;whatever&quot; style=&quot;visibility:hidden;&quot;>
<option> A
<option> B
<option> C
</select>
</div>
3) Disappearing, reappearing select box with shortened div that also disappears onBlur for select box:<br>
<div onMouseOver=&quot;this.children[0].style.visibility='visible';&quot; onMouseOut=&quot;this.children[0].style.visibility='hidden';&quot; style=&quot;width:100px;&quot;><select name=&quot;whatever&quot; onBlur=&quot;this.style.visibility='hidden';&quot; style=&quot;visibility:hidden;&quot;>
<option> A
<option> B
<option> C
</select>
</div>
4) Disappearing, reappearing select box with shortened div that also disappears onBlur for select box with a colored div to show that iut doesn't disappear:<br>
<div onMouseOver=&quot;this.children[0].style.visibility='visible';&quot; onMouseOut=&quot;this.children[0].style.visibility='hidden';&quot; style=&quot;width:100px;background-color:#aaaadd;&quot;><select name=&quot;whatever&quot; onBlur=&quot;this.style.visibility='hidden';&quot; style=&quot;visibility:hidden;&quot;>
<option> A
<option> B
<option> C
</select>
</div>
As you can see the space remains behind.
</BODY>
</HTML>

Hope those help (or at least amuse :) )

-Tarwn
-Tarwn &quot;If you eat a live toad first thing in the morning, nothing worse will happen all day long.&quot; - California saying
&quot;To you or the toad&quot; - Niven's restatement of California saying
&quot;-well most of the time anyway...&quot; - programmers caveat to Niven's restatement of California saying
(The Wiz Biz - Ri
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top