Rupeal
RSSLinkedInTwitterFacebook

HTML Radio Buttons

Well… what if you have a group of two (or more) radio buttons and want to use the onchange event like this:

<input type="radio" name="xpto" value="One" onchange="onChangeHandler()" checked/>

<input type="radio" name="xpto" value="Two" onchange="onChangeHandler()"/>

When the onChangeHandler is fired up, which value is on our radio button form parameter “xpto” ? The old one? Or the new one?

It’s Just a matter of your web browser choice: If you use Firefox you’ll get the new value. But if you use Internet Explorer you’ll get the old one!

What about that?

For my case, where I wanted the new value, I’ve just starting using onclick and filter when the same value is selected.

Rui Alves on February 27th, 2007

Software Development

0
 

Deixe um Comentário