[thelist] JavaScript: detecting and undoing radio button change

Tom Dell'Aringa pixelmech at yahoo.com
Wed Apr 2 14:21:22 CST 2003

--- Joel Canfield <joel at spinhead.com> wrote:
> For one brief shining moment, I thought I knew something about
> JavaScript. I'm over it now.

LOLOLOL. JOIN the club.

> I have a group of radio buttons which, when *changed*, will blank
> out a
> group of text fields. However, I want to give the user the
> opportunity to
> change their mind. Using a 'confirm' I can abort the blanking of
> the text
> fields, but the radio button still changes, which I don't want.

Have a code snippet? If the radio button is clicked, its going to
change. I'm not sure you can prevent that. You could simply recheck
the first one again if they cancel out and unblank the fields. That
is probably the route you need to go.

> If I use 'onblur' I can grab the value of the button before it
> changes, and
> change it back (I think) but then it fires on *all* onblurs,
> including when
> the user just ALT+TABs to another window.

I don't think you want to use onBlur, it can be messy... someone
maybe can confirm that...


var me = tom.pixelmech.webDeveloper();

[Making A Commercial Case for Adopting Web Standards]

"That's not art, that's just annoying." -- Squidward

Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more

More information about the thelist mailing list