ballhogjoni
Programmer
Please help me with this code. I am gettign a object expected on line 32 error. Line 32 is <select name="COUNTRY" id="COUNTRY" onChange="checkCounty()">
<script language="javascript">
function checkCountry() {
var country = this.form[0].COUNTRY.value;
if (country == "United States") {
var stateProvidence = "<select name=\"STATEORPROVINCE\"></select><input type=\"hidden\" name=\"r_STATEORPROVINCE\" value=\"Please enter the state\">";
} else if (1+1==5) {
} else {
var stateProvidence = "<font color=\"#FF0000\">State is not needed for the United Kingdom</font></p>";
}
}
</script>
</head>
<body>
<form action="cccccc.php" name="form1" method="post">
<table width="350" border="0" cellpadding="2" cellspacing="2">
<tr>
<td align="right" width="157"><b><label for="COUNTRY">Country</label></b></td>
<td>
<select name="COUNTRY" id="COUNTRY" onChange="checkCounty()">
<option value="">Select One</option>
<option value="United States" selected="selected">United States</option>
<option value="United Kingdom">United Kingdom</option>
<option value="Australia">Australia</option>
<option value="Canada">Canada</option>
<option value="Ireland">Ireland</option>
<option value="New Zealand">New Zealand</option>
<option value="South Africa">South Africa</option>
<option value="Puerto Rico">Puerto Rico</option>
</select>
<input type="hidden" name="r_COUNTRY" value="Please enter the country"> </td>
</tr>
</table>
<script language="javascript">
function checkCountry() {
var country = this.form[0].COUNTRY.value;
if (country == "United States") {
var stateProvidence = "<select name=\"STATEORPROVINCE\"></select><input type=\"hidden\" name=\"r_STATEORPROVINCE\" value=\"Please enter the state\">";
} else if (1+1==5) {
} else {
var stateProvidence = "<font color=\"#FF0000\">State is not needed for the United Kingdom</font></p>";
}
}
</script>
</head>
<body>
<form action="cccccc.php" name="form1" method="post">
<table width="350" border="0" cellpadding="2" cellspacing="2">
<tr>
<td align="right" width="157"><b><label for="COUNTRY">Country</label></b></td>
<td>
<select name="COUNTRY" id="COUNTRY" onChange="checkCounty()">
<option value="">Select One</option>
<option value="United States" selected="selected">United States</option>
<option value="United Kingdom">United Kingdom</option>
<option value="Australia">Australia</option>
<option value="Canada">Canada</option>
<option value="Ireland">Ireland</option>
<option value="New Zealand">New Zealand</option>
<option value="South Africa">South Africa</option>
<option value="Puerto Rico">Puerto Rico</option>
</select>
<input type="hidden" name="r_COUNTRY" value="Please enter the country"> </td>
</tr>
</table>