function formatPostalcode(pcode) {
var regexObj = /^\s*([a-ceghj-npr-tvxy]\d[a-ceghj-npr-tv-z])(\s)?(\d[a-ceghj-npr-tv-z]\d)\s*$/i
if (regexObj.test(pcode)) {
var parts = pcode.match(regexObj);
var pc = parts[1] + " " + parts[3];
return pc.toUpperCase();
}
else {
return pcode;
}
}
function SetLookup(fieldName, idValue, textValue, typeValue) {
var value = new Array();
value[0] = new Object();
value[0].id = idValue;
value[0].name = textValue;
value[0].typename = typeValue;
setDisabledField(fieldName, value);
}
var regexObj = /^\s*([a-ceghj-npr-tvxy]\d[a-ceghj-npr-tv-z])(\s)?(\d[a-ceghj-npr-tv-z]\d)\s*$/i
if (regexObj.test(pcode)) {
var parts = pcode.match(regexObj);
var pc = parts[1] + " " + parts[3];
return pc.toUpperCase();
}
else {
return pcode;
}
}
function SetLookup(fieldName, idValue, textValue, typeValue) {
var value = new Array();
value[0] = new Object();
value[0].id = idValue;
value[0].name = textValue;
value[0].typename = typeValue;
setDisabledField(fieldName, value);
}
No comments:
Post a Comment