Form1 validation:
Vendor = document.getElementById('cmbVendor').value
VendorContact = document.getElementById('cmbVendorContact').value
company = document.getElementById('cmbCompanyName').value
companyContact = document.getElementById('cmbContact').value
location = document.getElementById('cmbLocation').value
visa = document.getElementById('cmbVisa').value
hire = document.getElementById('cmbHire').value
pmRole = document.getElementById('role').value ;
Form2 validation:
function AddVendor(){
var locId = document.getElementById('cmbLocationVendor')
if(locId != null) {
form.V_location.value = document.getElementById('cmbLocationVendor').value;
}
if(form.V_cname.value == '' ) {
//alert("Enter Vendor Name: " + Vendor);
document.getElementById('V_cname').value=pmVendorId;
form.V_cname.focus();
}
Error: It Will occured in second Form. The value will not pass this form. The true condition value only displayed. So If loop only executed ,It will not go to next line.
Vendor = document.getElementById('cmbVendor').value
VendorContact = document.getElementById('cmbVendorContact').value
company = document.getElementById('cmbCompanyName').value
companyContact = document.getElementById('cmbContact').value
location = document.getElementById('cmbLocation').value
visa = document.getElementById('cmbVisa').value
hire = document.getElementById('cmbHire').value
pmRole = document.getElementById('role').value ;
Form2 validation:
function AddVendor(){
var locId = document.getElementById('cmbLocationVendor')
if(locId != null) {
form.V_location.value = document.getElementById('cmbLocationVendor').value;
}
if(form.V_cname.value == '' ) {
//alert("Enter Vendor Name: " + Vendor);
document.getElementById('V_cname').value=pmVendorId;
form.V_cname.focus();
}
Error: It Will occured in second Form. The value will not pass this form. The true condition value only displayed. So If loop only executed ,It will not go to next line.