But browser shows syntax error
Code: Select all
req.open('GET','http://localhost:9998/main.xul?sendID=id&action=test¶m=p', true);
---------------------------------------------------------------^
My function looks like this
Code: Select all
function sendData(sendID)
{
var p = document.getElementById('idtxb').value;
var req = new XMLHttpRequest();
req.open('GET','http://localhost:9998/main.xul?sendID=id&action=test¶m=p', true);
req.onreadystatechange = function() {
if (req.readyState == 4) {
if (req.status == 200) {
document.getElementById('idtxb').value = req.responseText;
}
if (req.status == 404) {
alert('Something is wrong!');
}
}
};
req.send();
};
What is wrong and what is the correct way to pass parameters?