A
Anonymous
Guest
Can someone identify the mistake in the following simple code or suggest a better way to reload a form?
I keep getting the following error:
"document.form.outx is null or not an object."
when trying to change the selection from the first option list.
Thanks.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script language="JavaScript">
function reloadform() {
document.form.outx.submit();
}
</script>
</head>
<body>
<form name='outx' action='index.php'>
<select name='sel1' onchange="javascript: reloadform()">
<option>A</option><option>B</option><option selected>C</option>
</select>
<select name='sel2'>
<option>1</option><option selected>2</option><option>3</option>
</select>
Submit:<input type='submit' value='Submit me'>
</form>
</body>
</html>
I keep getting the following error:
"document.form.outx is null or not an object."
when trying to change the selection from the first option list.
Thanks.