I am trying to pass multiple variables and it is not working. When I click a link, I would like this to execute, but nothing happens. When I'm passing only one variable, this does work. Am I leaving out a part?
Here is the code:
function test(s,g)
{
if (window.XMLHttpRequest)
{
testThis=new XMLHttpRequest();
}
else
{
testThis=new ActiveXObject("Microsoft.XMLHTTP");
}
testThis.onreadystatechange=function()
{
if (testThis.readyState==4 && testThis.status==200)
{
document.getElementById("exampleDiv").innerHTML=testThis.responseText;
}
}
testThis.open("GET","something.php?s="+s+"&g="+g,true);
testThis.send();
}
Any kind of help is appreciated. Thanks!