Hi There, I have a dropdown field called county that i want to set to a value of when a link is clicked. See my example code. Any input would be great thanks.
The error i get is document.forms[o].county is null or not an object.
Code:
<html>
<head>
<script language="JavaScript">
function setfield(){
document.forms[0].county.value ="TEST"
}
</script>
</head>
<body>
<a href="#" onClick="setfield()">set dropdown</a>
<select name="county" id="county">
<option value"not set">not set</option>
<option value" still not set">still not set</option>
</select>
</body>
</html>