I have data returned from a query that outputs in an array named 'uarray' and a list named 'ulist'.
I have not succeeded in altering the following script to prompt the user with an error for the array or the list. It only works with a hard coded example that follows.
if (document.updateForm.mtf_uic_id.value == 'N00160') {
alert('Please enter a New UIC for this Associated MTF UIC.\n(An Associated MTF UIC must be unique.)');
document.updateForm.mtf_uic_id.style.backgroundColor='yellow';
document.updateForm.mtf_uic_id.focus();
errorfound = true;
}
The complete function follows:
function submitForm(){
clearErrors();
// alert("Submit Form was clicked");
var errorfound = false;
var uic = document.updateForm.mtf_uic_id.value
var uic1 = uic.charAt(0)
if (document.updateForm.mtf_uic_id.value == 'N00160') {
alert('Please enter a New UIC for this Associated MTF UIC.\n(An Associated MTF UIC must be unique.)');
document.updateForm.mtf_uic_id.style.backgroundColor='yellow';
document.updateForm.mtf_uic_id.focus();
errorfound = true;
}
if(errorfound == false) {
else {
return false;
}
}
Thanks very much,
Mark