473,396 Members | 2,039 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Barcode reader + WWW

Hi
i need a script that will auto-submit a form when someone enters 11
characters into one of textfields..

any ideas?
Thanks ;-)

Peter
Jul 20 '05 #1
9 5128
"Piotr Nowak" <pi*****@withoutthispocztal.com> wrote in message
news:jT****************@newssvr16.news.prodigy.com ...
Hi
i need a script that will auto-submit a form when someone enters 11
characters into one of textfields..

any ideas?
Thanks ;-)

Peter


Perhaps:

<html>
<head>
<title>keypress.htm</title>
<script type="text/javascript">
function eleven(that) {
if (that.value.length == 11) {
document.form1.submit();
}
}
</script>
</head>
<body>
<form action="keypress.htm" method="get" name="form1">
<input type="text" onkeypress="eleven(this)">
</form>
</body>
</html>
Jul 20 '05 #2
thanks... that's what i needed ;-)

Pete
Jul 20 '05 #3
In article <jT****************@newssvr16.news.prodigy.com>, "Piotr Nowak"
<pi*****@withoutthispocztal.com> writes:
Hi
i need a script that will auto-submit a form when someone enters 11
characters into one of textfields..

any ideas?


And if the 11th character is a tyop? (Yes, thats an intentional typo).
--
Randy
Jul 20 '05 #4
> Perhaps:

nope... it does not work the way it should...
if i set it to 10 characters, person has to enter 10 chars, the form is
being submitted, but only 9 characters are submitted. It cuts the last
character.

any ideas?
Jul 20 '05 #5
> And if the 11th character is a tyop? (Yes, thats an intentional typo).

it will be string fed by a barcode reader

Pete
Jul 20 '05 #6
In article <l7_Lb.15949$Rc4.64217@attbi_s54>, "Piotr Nowak"
<pi*****@pocztal.com> writes:
Perhaps:


nope... it does not work the way it should...
if i set it to 10 characters, person has to enter 10 chars, the form is
being submitted, but only 9 characters are submitted. It cuts the last
character.

any ideas?


us the onkeyup or onchange of the field instead of the onkeypress. onkeypress
fires as soon as the key is pressed, not after its released. And it may be a
timing issue where the key is pressed, and before its released the form is
submitted.

Personally, I would use the onchange event and when the field gets changed, and
exited, the form would submit.
--
Randy
Jul 20 '05 #7
> Personally, I would use the onchange event and when the field gets
changed, and
exited, the form would submit.


on change does not work at all
onkeypress, onkeydown, onkeyup - those are cutting the last character.

any other ideas? :)

Jul 20 '05 #8

"actually when i set
if (that.value.length == 3) {

it submits 3 characters, but i have to enter 4 to submit that form., nothing
happens after entering 3rd char.
after 4th form is submitted but i have only 3 chars submitted..

Jul 20 '05 #9
Piotr Nowak wrote:
And if the 11th character is a tyop? (Yes, thats an intentional typo).


it will be string fed by a barcode reader


Sorry, if you suggest that the read data should be submitted
immediately without user control, you have no clue of how
barcode readers (can) (mal)function. Let it be a bug (real
or electronical) on the barcode and your whole data is garbled.

I strongly recommend against such an automatism.
PointedEars
Jul 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Tom | last post by:
Using VB6, I want to read barcode data into an Access 2000 DB. What do you get when you read a barcode? Text or numbers. How do you define the field were the data would be stored? Thanks in...
4
by: Mat | last post by:
Does anyone know how to generate ,print and read barcode with VB.NET?
5
by: neilphan | last post by:
Hi all, I have an application that uses input from a barcode reader via a USB port. My application works fine only if the application HAS FOCUS. If the user opens up another application (not...
6
by: Samuel Shulman | last post by:
I would like to add barcode functionality to my POS program How does one attach barcode reader is it usually USB port How can the program get the data read by the device Thank you, Samuel
3
by: PaoloB | last post by:
Hi everyone, I am searching for a python library for barcode recognition. We have developed a rather complex application for document tracking and document management in python/Zope, called...
7
by: Alper Ozgur | last post by:
Hi; How can i capture and decode the barcode that reading by an usb Barcode reader?
4
by: Joe | last post by:
is there any free barcode reader in vb8 for code-128 ??
7
by: jim | last post by:
I need to have 2 simple barcode reader applications finished by midnight tonight. I have never written any barcode reader software and need any help that you may be able to offer. I do not know...
1
by: bojkar | last post by:
Hello everyone. I have quastion :) I have metrologic Eclipse MS5145 bar code reader in usb. Now I want read barcode from him. I'd searched metrologic homepage, a lot's of forums and search engines...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.