...

View Full Version : Auto submit form after value



samall
11-04-2004, 02:52 PM
Hello,
Is it possible to auto submit a form when a value is filled in an input field. I need this for a barcode scanner. So let's say:

I scan a barcode with a 6 digitnumber to an inputfield. When there are 6 characters in the inputfield I want to submit the form.

Is that possible?

Thanks for any help!

Samall

A1ien51
11-04-2004, 04:15 PM
you can use the onchange event on a form field and submit the form with document.formName.submit()

Eric

samall
11-05-2004, 07:48 AM
Hi,
Thanks for your answer. Your script is working, but not exactly what I was searching. The onChange event requires a change. So I have to click on some spot and then the action begins. I need something that automaticly after x charathers the form submit without clicking or using the tab key.

Is that possible with Javascript?

Thanks!

This is the onChange script:
<form name="testForm" action="test2.htm">
<input type="text" name="test" onChange="document.testForm.submit()">
</form>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum