John,
I would pre-populate the dropdowns before User clicks on them, say when the
page is loaded, but if you need to wait until User decides to use your
control, you can try to work around the IE issue by placing the following (or
similar) code in onmousemove event:
<select onmousemove='prePopulate(this)' ...
<script ...
function prePopulate(ddn){
if (ddn.options.length == 0)
// call your populate function:
populateDropdown(ddn);
}
it seems to be working fine for smaller lists (up to a few hundred items)
HTH
"John A Grandy" wrote:
What's the difference ?
"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:%2****************@TK2MSFTNGP05.phx.gbl...
Why don't you just return true in populateDropdown and call it as
onclick="return populateDropdown(this)"?
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"John Grandy" <johnagrandy-at-gmail-dot-comwrote in message
news:%2***************@TK2MSFTNGP06.phx.gbl...
>I wrote a function to populate my dropdowns on the client-side.
The function adds <optionelements to the <selectonly if none are
initially present.
I call the population function from either the onfocus or onclick event
of the <selectas follows :
onclick="populateDropdown(this);return true;"
It works in Firefox.
In IE, the dropdown is populated but the default handler for the click
event is not invoked, thus requiring the user to click the dropdown twice
: once to populate it and once to drop it down.
Does anyone know what is going on and a workaround for what appears to be
an IE bug ?