<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,780
Messages
2,569,611
Members
45,273
Latest member
DamonShoem

Latest Threads

Top