Link to home
Start Free TrialLog in
Avatar of Richard Korts
Richard KortsFlag for United States of America

asked on

Clear Javascript Radio Buttons

I have a form with four radio buttons. See http://lawnsprinklerservices.com/lss_form2.php at the bottom. (Services offered).

When the customer clicks one of the four choices, I will display a confirmation message & if they answer "no", I want co clear ALL the selections.

The name of the radio buttons is "plan".

I can't figure out how to do this in Javascript.

Can someone help.

Thanks
Avatar of leakim971
leakim971
Flag of Guadeloupe image

replace :
jj = confirm("Please confirm selection of plan " + plan + " at a base price of $" + a);
if (!jj) {
     return false;
}

Open in new window

by :
jj = confirm("Please confirm selection of plan " + plan + " at a base price of $" + a);
if (!jj) {
     $$("[name='plan']").setProperty("checked", false);
     return false;
}

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of OmniUnlimited
OmniUnlimited
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
line 3 is not jQuery but Mootools
Ah, right.  Wasn't familiar with that.  Thanks!