Sachin Shah Sachin Shah - 1 year ago 104
Ajax Question

How to pass multiple parameters in ajax?

How can I pass multiple Parameter ??? In tempid if id is 1 and remove is is 8 then I got the display :

For input string: "8,tempid=1"

function removecall(remove_member)
alert("Remove : "+remove_member);
var teamid = document.getElementById('team_id_hide').value;
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("manage_team_div").innerHTML = this.responseText;
};"GET", "Remove_Member?member="+remove_member+"tempid="+teamid, true);

Answer Source

You should change it as code below shows (include '&').You have to use it every time that you need to add a new parameter:"GET", "Remove_Member?member="+remove_member+"&tempid="+teamid, true);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download