on 11-17-2005 12:05 PM
Hi all,
See the code in the BOLD. What that actually means????
// Check barcode format for Returned outward remittance only
function checkFormat(){
if ( document.all['w_type'].value == 4 &&
document.all['w_level'].value == 1) {
<b> var loc_checkpattern = /^3012\d{7}.$/;</b> var loc_result = document.all['w_barcode'].value.search(loc_checkpattern);
if (loc_result == -1) {
loc_checkpattern = /^3992\d{7}.$/;
loc_result = document.all['w_barcode'].value.search(loc_checkpattern);
if (loc_result == -1) {
document.all['MessageVal'].innerHTML = ' Error : Barcode is the wrong format';
errorCheck = 'X';
}
}
}
}
Thanks
Kam
Hello Kam,
pattern matching 3012*******
e.g. (BOL) "3012" followed by 7 digits (EOL)
http://www.greenend.org.uk/rjk/2002/06/regexp.html
Regards,
Fekke
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.