First of all, i haven't been to this site in a while and WOW is it much improved. I love all the new stuff--it looks great!
I am all but done building a simple Point of Sale system through javascript but my current conflict is that our barcode scanner reads "785" as "00785." I've tried everything to filter out the zeros: regexp, converting to integer and multiplying/dividing by 1, and a couple other sidewall experimental approaches but the zeros still remain. Here's my current set up. Remember, all I want to do is screen the leading zeros from the input and this comes in on line 2.
any suggestions??
I am all but done building a simple Point of Sale system through javascript but my current conflict is that our barcode scanner reads "785" as "00785." I've tried everything to filter out the zeros: regexp, converting to integer and multiplying/dividing by 1, and a couple other sidewall experimental approaches but the zeros still remain. Here's my current set up. Remember, all I want to do is screen the leading zeros from the input and this comes in on line 2.
Code:
input = parseInt(input_line.replace("^0+", '')); //it's an item number... drop zeros ... maybe? }
Comment