I'm working on the following. It basically passes ?answer=1 if js is enabled. It works until I add the onload argument (as I want this to happen without a user trigger). However adding onload appears to stop (the otherwise working) getElementById argument. Why is this happening?
<script type="text/javascript">
window.onload = function() {
document.getElementById('answer').value = '1';
}
</script>
</head>
<body onload="document.forms[0].submit();">
<form name="form" action="enabled_catch.php" method="get">
<input type="hidden" name="answer">
</form>
thanks