|
 |
javascript thread: barcode scan jumping to action page before want.
Message #1 by "Anna Leslie" <adleslie@u...> on Fri, 23 Aug 2002 17:33:34
|
|
Very often barcode devices are set to "enter" after the barcode is read.
You can check this by scanning a barcode into notepad and seeing if it
gives you a carriage return.
-Jerry
-----Original Message-----
From: Anna Leslie [mailto:adleslie@u...]
Sent: Friday, August 23, 2002 5:34 PM
To: javascript
Subject: [javascript] barcode scan jumping to action page before want.
I use ColdFusion on Windows 2000. When I scan a barcode the form page
jumps to the action page, before I have a chance to scan in a second
barcode.
This is what I placed in my header on the form page:
<script LANGUAGE="JavaScript">
<!--
function checkit(theField)
{
if (theField.length==10)
{
alert("Length is 10");
}
}
//-->
</script>
This is in the body:
<cfloop index="X" From=1 To=#form.NumOfPlate#>
<tr>
<td><cfoutput><input type="text"
name="Plate#X#Barcode" Size="25" maxlength="50" onKeyPress="checkit
(this)"></cfoutput></td>
</tr>
</cfloop>
thanks,
Anna
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
|
|
 |