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

Opening a <select></select> by clicking another element?

Status
Not open for further replies.

Maim

Programmer
Jun 25, 1999
106
CA
Hi, I was wondering if it's possible to open up a select element (combobox?) by clicking on another object, as if I were actually clicking on the select?

Code:
<select id=&quot;justATest&quot;>
<option>this
<option>is
<option>just
<option>a
<option>test
</select>
....
<button onclick=&quot;document.all.justATest.click&quot;>click to open</button>


-----------------------------------
&quot;Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.&quot; - Rich Cook
 
Maim,

I don't think that this can be done. Although IE/Win fires the onClick event of the SELECT element, it doesn't drop down.

Sorry for the bad news ;o)

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top