Laride
asked on
Submit form to ajax from onChange (Select box)
I have a page with an ajax function on which works absolutely fine. I click on the submit button and it executes my ajax code no problem with the following code ..
onsubmit="ajaxQuote('ajaxQ uoteCalcul ation.asp' ,this);"
I am picking up the form variables in the ajax function with:
str = 'leaseAmount=' + frm.leaseAmount.value + '&payYears=' + frm.payYears.value + '&sendMail=' + frm.sendMail.value + '&school=' + frm.school.value + '&freq=' + frm.freq.value + '&description=' + frm.description.value
and then closing the ajax function with:
xmlHttp.open("POST",SaveUR L,true);
xmlHttp.setRequestHeader(" Content-ty pe", "application/x-www-form-ur lencoded") ;
xmlHttp.setRequestHeader(" Content-le ngth", str.length);
xmlHttp.setRequestHeader(" Connection ", "close");
************************** ********** ********** ********** ********
I need to be able to trigger the ajax function whenever a value is changed in one of the drop down select boxes and also when the main value (in a text box) is changed. It must recalculate on any change made. How do I do this?
onsubmit="ajaxQuote('ajaxQ
I am picking up the form variables in the ajax function with:
str = 'leaseAmount=' + frm.leaseAmount.value + '&payYears=' + frm.payYears.value + '&sendMail=' + frm.sendMail.value + '&school=' + frm.school.value + '&freq=' + frm.freq.value + '&description=' + frm.description.value
and then closing the ajax function with:
xmlHttp.open("POST",SaveUR
xmlHttp.setRequestHeader("
xmlHttp.setRequestHeader("
xmlHttp.setRequestHeader("
**************************
I need to be able to trigger the ajax function whenever a value is changed in one of the drop down select boxes and also when the main value (in a text box) is changed. It must recalculate on any change made. How do I do this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
works a treat.