[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...

Tom

=====
http://www.pixelmech.com/
var me = tom.pixelmech.webDeveloper();

http://www.maccaws.com/
[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
http://tax.yahoo.com


More information about the thelist mailing list