hi,
i'm quite new to javascript and AJAX,
but i know java, but haven't really used it for quite a while,
mostly i only do PHP,MYSQL
however, i think that my question is mostly related to javascript,
that's y i postig my question here
I'm trying to implement a barcode reader system
using php, mysql , javascript and AJAX
I'm trying to detect \n which will b passed from the barcode reader,
and then something (some action) will be invoked.
for example, i will have one text field display,
the field will be cursored (prompted)
i'll have barcode reader,
scan one barcode,
barcode (number) is then inputted into the system
(which normally, the number that has been read will b appended by \n)
then , the new field will then pop out (using CSS, JAVAscript)
what i don't know how to do is the part that is need to detect the newline sysbol
and then another textfield will b pop out
i do believe that i have to use javascript to detect it,
but i just don't know how to start,
i've been searching for this for a few days, already.
any help on this would b realy appreciate.
Tom
by: basicinstinctPosted on 2006-12-22 at 21:47:14ID: 18190903
Well you can use String.indexOf("\n") just like in Java, or you can use String.match(/\n/)