textboxes dependant on quantity dropdown
I want to be able to choose how many textboxes come up when I select a quantity from a dropdown select.
currently I have a div which is hidden but holds all the textboxes.
<script language="JavaScript">
function hideSomeControls(value){
var os0 = document.getElementById("inp");
if(value == "Single Ticket") os0.style.visibility = "hidden";
else os0.style.visibility = "visible";
return false;
}
</script>
<link href="../SpryAssets/SpryValidationSelect.css" rel="stylesheet" type="text/css">
<link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css">
</head>
<td class="style6">Ticket Type:</td>
<td class="style6"><span id="spryselect1">
<select name="os0" id="os0" onChange="hideSomeControls(this.value)">
<option value="Single Ticket">Single Ticket - £<?php echo $row_event_selector['single_price']; ?></option>
<option value="Table">Table - £<?php echo $row_event_selector['table_price']; ?></option>
</select>
<span class="selectRequiredMsg">Please select a Ticket Type.</span></span></td>
I want to be able to give the user the ability to select how many guests he/she will be bringing then show the correct amount of textboxes.
Each guest will have two textboxes "name" and "occupation"
