This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Site Ratings & Reviews > December 2003 > IE Bug: onchange event not called when using <optgroup> in select drop-down





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author IE Bug: onchange event not called when using <optgroup> in select drop-down
Ryan McGeary

2003-12-21, 11:48 pm

In a <select> drop-down, the onchange event isn't called when
scrolling through the dropdown using the mouse-wheel and when crossing
over a new <optgroup>.

Using the example below, notice how the onchange event isn't called
when mouse wheel scrolling between A3 and B1, but it works properly
when scrolling between A1 and A2.

E.g.
------------------------------------------
<html>
<body onload="document.forms['myForm'].elements['mySelect'].focus()">

<form name="myForm" id="myForm">
<select onchange="alert('onchange event');" name="mySelect"
id="mySelect">
<optgroup label="Group A">
<option value="A1">A1</option>
<option value="A2">A2</option>
<option value="A3">A3</option>
</optgroup>
<optgroup label="Group B">
<option value="B1">B1</option>
<option value="B2">B2</option>
<option value="B3">B3</option>
</optgroup>
<optgroup label="Group C">
<option value="C1">C1</option>
<option value="C2">C2</option>
<option value="C3">C3</option>
</optgroup>
</select>
</form>

</body>
</html>
------------------------------------------

Thanks,
Ryan McGeary
Toby A Inkster

2003-12-21, 11:48 pm

Ryan McGeary wrote:
quote:

> In a <select> drop-down, the onchange event isn't called when
> scrolling through the dropdown using the mouse-wheel and when crossing
> over a new <optgroup>.



Confirmed. Further though, the same bug happens when changing using the
up and down arrows on the keyboard.

I'm not sure how this is relevant to a.h.critique though.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?page=132

Ryan McGeary

2003-12-21, 11:48 pm

Toby A Inkster <UseTheAddressInMySig@deadspam.com> wrote in message:
quote:

>
> Confirmed. Further though, the same bug happens when changing using the
> up and down arrows on the keyboard.
>
> I'm not sure how this is relevant to a.h.critique though.




Thanks. Sorry if this was an inappropriate place to post. I've just
been having trouble getting responses from anywhere else. No one from
microsoft.public.windows.inetexplorer.ie6.browser has responded in a
week.

-Ryan
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews