Ajax onchange request

Hello,

I need a suggestion about ajax response request.

Suppose, I have a select box and onchange function which call AJAX XMLHttpRequest function. Now my question is if i use onchange function and additionally i pass parameter which is not from Onchange to AJAX XMLHttpRequest, is it possible? If possible then how?

Thanks,
RIma.

Hi there,

I’m afraid I don’t quite understand your question.

In it’s basic form, an AJAX request looks something like this:

var r = new XMLHttpRequest(); 
r.open("POST", "webservice", true);
r.onreadystatechange = function () {
	if (r.readyState != 4 || r.status != 200) return; 
	console.log(r.responseText);
};
r.send("a=1&b=2&c=3");

So what do you want to pass from where to where?
It would be helpful to see some code.