using radio buttons on checkout.php, when yes is chosen want another field to show
Hi,
On checkout.php I have a field using radio buttons asking are you a Florida resident (these are validated using client side). When yes is checked I want a drop down field to appear with Florida counties (this determines sales tax from a table). Also, want to have the county field validated. Here is my code so far:
<tr><td>*Are you a Florida Resident?</td><td onclick="WAValidateRQ(document.forms[0].radRes,'- Please choose yes or no for Florida residency',false,0,true,'radio');WAValidateEN(document.forms[0].radRes[1],document.forms[0].countyid,true)"><input class="input" type="radio" title="Choose from one of the options" name="radRes" id="radRes1" value="Yes">
<label for="radRes1"> Yes</label>
<input class="input" type="radio" title="Choose from one of the options" name="radRes" id="radRes2" value="No">
<label for="radRes2"> No</label></td></tr>
Dynamic drop down I want to show if yes is picked:
<tr><th><label for="counties" > *Please pick your county</label></th><td><label></label>
</label><select name="countyid" id="counties">
<option value="">Choose one</option>
<?php
do {
?>
<option value="<?php echo $row_rsCounties['countyid']?>"><?php echo $row_rsCounties['name']?></option>
<?php
} while ($row_rsCounties = mysql_fetch_assoc($rsCounties));
$rows = mysql_num_rows($rsCounties);
if($rows > 0) {
mysql_data_seek($rsCounties, 0);
$row_rsCounties = mysql_fetch_assoc($rsCounties);
}
?></select></td></tr>
Thank you,
Karen