Dropdown Issue in IE with Dynamically Populated SELECT Field (Bug??)



Hello,

I'm trying to dynamically load a list of teams into a SELECT field
(dropdown / combo box) when a user clicks on the field. (The teams are
pre-loaded into JS arrays via ASP/SQL -- not shown.)

My problem is when I click on the box, the team loading *works*, but
it's performing a funky action. Upon click, it drops down once and the
teams are there. But in a split second (once the box drops down to its
bottom limit) the screen flickers and the box rolls back up to its
original state. (It almost appears as if I clicked twice on the box.)

I've tried onclick, onmousedown, onfocus... none work right. I even
tried appendChild with no luck.

I'm using Internet Explorer to view the page and I'm only targeting IE
since a very small number of users will be loading this page. I loaded
it into Firefox, Netscape and Opera just for kicks, though -- Firefox
and Netscape performed the action correctly and Opera didn't drop
anything down at all. (Nice.)

Anyway, is this a known bug in IE? Something I'm doing wrong? A
combination? Any help would be appreciated.


<select ... size="1" style="width: 175px;"
onmousedown="loadTeams(this)">
<option value="" selected></option>
</select>

<script>
function loadTeams(e) {
e.options.length = 0;
e.options.add(new Option("", "", true, false));

for (i=0; i < teamids.length; i++) {
e.options.add(new Option(teams[i], teamids[i], false, false));
}
}
</script>

.



Relevant Pages

  • page design or browser problem?
    ... I've viewed it with Firefox, Netscape 7.1, and Opera v8 but whilst MS IE ... holding the navigation menu, and suitably described in the code as ...
    (uk.net.web.authoring)
  • onLoad for webservice.htc
    ... works perfectly in Internet Explorer and Netscape. ... browsers (Internet Explorer, Netscape, Opera, and Firefox)? ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Has the Philips web site finally gone to lalaland?
    ... Same here - Opera loads much faster than Firefox or MSIE. ... Oddly enough, Netscape 2.02 is still used regularly for a number of tasks, ...
    (sci.electronics.design)
  • Scrolling tables that work
    ... Work fine in Opera, Firefox, Mozilla, Netscape and IE in the latest ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: Alter Rechner
    ... (Sowieso drauf: Seamonkey 1.1.11, mein Standardbrowser.) ... schnell installieren, wobei der Firefox-Installer bei Bedarf m.E. ein ... Danach erkennt man dann aber recht schnell, daß Opera immer noch ... Firefox, der sich explizit auch an unbedarftere Nutzer richtet, stolpert ...
    (de.comp.hardware.misc)

Loading