View Full Version : How do I get a form to refresh when a radio button is clicked?

02-27-2005, 08:13 PM
I am trying to create a registration form. The user might want to enter either business details or personal details so I am using radio buttons for the user to select what type of details they want to enter. I have got it working so that it will enable and disable the appropriate textfields after a submit button has been selected (using an if.. else statement in php), however I want it to enable and disable the appropriate textfields as soon as the radio button is clicked (ie not using the submit button).

The following is the html code I have got for the radio buttons:
<TR><TD>&nbsp</TD><TD><INPUT TYPE = "radio" NAME="addressType" VALUE='personal' {$c1} onClick='registrationForm.php' />Personal Address</TD></TR>
<TR><TD>&nbsp</TD><TD><INPUT TYPE = "radio" NAME="addressType" VALUE='business' {$c2} onClick='registrationForm.php' />Business Address</TD></TR>

Can anyone help me please?
Im a novice please go easy!

02-28-2005, 03:55 AM
You can't do that with HTML/CSS. try the PHP or JS sections of this site for more answers.


02-28-2005, 03:11 PM
Ok will do, thank you.

02-28-2005, 08:06 PM
For anyone who wants to know, I found out that you use:


02-28-2005, 08:12 PM
Glad you found a resolution to your problem! :)