The HTML 4.01 Specification says this about the onchange event:
"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."
Okay. Well currently Firefox doesn't follow this (at least for radio buttons), but instead does something outrageous; it fires an onchange event if something changes, for example, if the radio button checked state changes. (Although I hear it "correctly" fires onchange for a text input only when it loses focus; perhaps to avoid the event noise that would occur during text entry).
Sarcasm aside, I imagine there are good reasons for the HTML Specification but I can't help but think, at least in the post submit-page-refresh model of web development, that we could stand to have a more immediate onchange event, perhaps called onvaluechange?
Some hacky vanilla test code is in my exploratory. Yes, I've taken a liking to using the word exploratory as a noun.
7 comments:
Oops. I wrote "post submit-page-refresh model of web development" but I should have written something like "new age of rich interactive web application development".
IE fires change events on SELECT whenever selection changes - which is pretty ugly if you look at accessibility. This function is most often used to send you off to some different part of the page if you make a choice. But if you select with the keyboard the selection will change several times, so it is pretty impossible to use. I prefer the way it is implemented in Firefox though I have seen some quite heated debates on this between web developers.
Found similar issues with the behaviour of drop-down boxes the other day. Selecting a value from the box with the keyboard, onchange handling is fired immediately a value is selected. Selecting with the keyboard, it fires only when focus leaves the box.
This caused some confusion over handlers updating other fields on the screen...
This is one of the knowledgeable post.This is one of the valuable information.Thanks for your support.
Android app developers
What youre saying is completely true. I know that everybody must say the same thing, but I just think that you put it in a way that everyone can understand. I also love the images you put in here. They fit so well with what youre trying to say. Im sure youll reach so many people with what youve got to say. Agen Sbobet Ibcbet.com Online Sbobet.com Online
You got numerous positive points there. I made a search on the issue and found nearly all peoples will agree with your blog. Judi Bola Agen Ibcbet
What about important info, I recommend you to read https://besttrackingapps.com/android-hacking-apps/ . You can learn a lot about hacking apps using these advices.
Post a Comment