Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How pass form value in Java script

Status
Not open for further replies.

php9

Programmer
Sep 28, 2008
1
AU
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.
 
Do you have a URL, as your question is really hard to understand... Also we don't know what values are being used, or how your validation is being called.

Perhaps you could re-word your question?

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top