Closed Thread Icon

Topic awaiting preservation: <select onChange... with keyboard in Firefox etc (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=24453" title="Pages that link to Topic awaiting preservation: &amp;lt;select onChange... with keyboard in Firefox etc (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: &lt;select onChange... with keyboard in Firefox etc <span class="small">(Page 1 of 1)</span>\

 
PaulBM
Nervous Wreck (II) Inmate

From: East Anglia, England.
Insane since: Sep 2003

posted posted 12-19-2004 23:35

I've been working on a page that uses a <select> with onChange to update the contents of a <div> as different <option>s are selected.

All's well until I use the keyboard in Firefox, then I have to press Return to trigger the onChange. I can see that that's perfect for most uses, like a page redirect, but for once, I actually want this to operate like IE to trigger the onChange as I scroll up and down the <options>s with the arrow keys.

Anyone know if this possible in Firefox etc? I suspect not.

Skaarjj
Maniac (V) Mad Scientist

From: :morF
Insane since: May 2000

posted posted 12-21-2004 02:15

Hiegh ho... Hiegh ho... it's over to javascript this does

*wanders off whistling to push the 'move thread' button*


Justice 4 Pat Richard

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 12-21-2004 02:35

Hmm... technically just scrolling within a select should not fire the onChange event. According to the spec "The onchange event occurs when a control loses the input focus and its value has been modified since gaining focus. This attribute applies to the following elements: INPUT, SELECT, and TEXTAREA."

You could emulate this functionality by capturing keypress events when the select has focus.



.:[ Never resist a perfect moment ]:.

« BackwardsOnwards »

Show Forum Drop Down Menu