I'm trying to post this form as soon as the user pastes something into the textbox, this code doesn't work:
Code:
<script type="text/javascript">
function sendForm() {
document.form1.submit();
}
document.getElementByName['ean'].focus();
function target(){document.form1.ean.focus();}
</script>
</head>
<body onLoad=target();>
<form name="form1" method="post" action="barcode.php">
<p>
<input type="text" name="ean" onChange="sendForm()">
</p>
</form>