Click to See Complete Forum and Search --> : [RESOLVED] Correct syntax for onClick in Checkbox


rtcary
05-18-2009, 09:25 PM
I have a check box with these parameters:

<input type="checkbox" name="ForeignAddr" value="1">

I would like the user to go to a page (claimant_edit.php) if they click on the box (change the value). Can this be done, and if so, what is the syntax for the onClick()?

Many thanks...

bradgrafelman
05-19-2009, 01:42 AM
onclick="window.location='claimant_edit.php'"should do the trick.

rtcary
05-19-2009, 02:30 PM
Since the Form is not submitted, I needed to pass a parameter (?toggle=value where value is a PHP variable) so the click toggles the state.