Marcus Marcus - 4 months ago 15
Ajax Question

Javascript AJAX call, 'GET' multiple values in URL

xmlhttp.open("GET","BAConsultRecordsAJAX.php?q="+str,true);


Is it possible to do this?

xmlhttp.open("GET","BAConsultRecordsAJAX.php?q="+str+"j="+str2,true);


I want a value to be stored in both q and j.

Ted Ted
Answer

of course it is

just add an & before each additional parameter like this:

xmlhttp.open("GET","BAConsultRecordsAJAX.php?q="+str+"&j="+str2,true);

Comments