I am trying to send 2 variables via get to a php page. If I send one or the other, it will work, but it wont read both, here is the command
Code:
function ajaxFunction()
{
var xmlHttp;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
// Internet Explorer
try
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
xmlHttp.onreadystatechange=function()
{
if(xmlHttp.readyState==4)
{
if(xmlHttp.responseText != "yes")
{
document.myForm.time.value=param;
}
else
{
document.myForm.time.value=xmlHttp.responseText;
}
}
}
xmlHttp.open("GET","time.php",true);
xmlHttp.send('name=' + document.myForm.username.value + '&password=' + document.myForm.password.value);
}
This is where the problem would be
Code:
xmlHttp.send('name=' + document.myForm.username.value + '&password=' + document.myForm.password.value);
Is there anything wrong with this?