<select> events

M

me

I have a select element that I'd like to have following behavior:
.. A click will populate the select options *if* another section of code has
not already populated
it and remain open for selection of an option.

The code I have almost works - it requires two clicks (FF or IE).
The first click successfully populates the select options, but then it
closes.
A second click opens the select and it works fine from then on.

I have the following code fragment:
<div id="d1" onclick="return doClick();">
<select id="s1" onchange="return doSelect();">
</select>
</div>

alternately I've used:
<div id="d1">
<select id="s1" onclick="return doClick();" onchange="return doSelect();">
</select>
</div>

Both produce the same results. Is there a way to do what I'm wanting
(eliminate the need for the second click)?

TIA

gerard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top