Hi. Please can someone help? I am using the following Form Javascript:
Post edited by: saf01, at: 2007/11/16 13:35
Edited to add code tags.<br><br>Post edited by: GreyHead, at: 2007/11/16 13:53
function ShowReg(op) {
document.getElementById('Ford').style.display='none';
document.getElementById('Vauxhall').style.display='none';
if (op == 1) {
document.getElementById('Ford').style.display="block";
}
if (op == 2) {
document.getElementById('Vauxhall').style.display="block";
}
}
And the following Form HTML:<select id="choice" onChange="ShowReg(this.selectedIndex)">
<option value='0'>Select Car Make
<option value="1">Ford
<option value="2">Vauxhall
</select>
<br>
<div id="Ford" style="display:none">
Ford Registration No. <input type="text" id="FordReg" value="">
What is Your Surname. <input name="txtlname" type="text" id="txtlname">
<input type="submit" name="Submit" value="Submit">
</div>
<div id="Vauxhall" style="display:none">
Vaxhaull Registration No. <input type="text" id="VauxhallReg" value="">
<input type="submit" name="Submit" value="Submit">
</div>
How do I make the Input fields (FordReg,txtlname,VauxhallReg) in the form above Required? I appreciate your help. If I turn on Validation and add the field names in the required field, I get "Object doesn't support this property or method" error when I run the form. Please help.
Post edited by: saf01, at: 2007/11/16 13:35
Edited to add code tags.<br><br>Post edited by: GreyHead, at: 2007/11/16 13:53