PDA

View Full Version : something is wrong


urgido
12-27-2007, 08:23 AM
function mylogin(elIdx,elIdy){
divResultado = document.getElementById('cresponse');
ajax=nuevoAjax();
ajax.open("GET", "login.php?User="+elIdx+"&Pass="+elIdy,true);
ajax.onreadystatechange=function() {
if (ajax.readyState==4) {
divResultado.innerHTML = ajax.responseText
}
}
ajax.send(null)
}

But not work!!! why?? :(

A1ien51
12-27-2007, 03:30 PM
Is the code hitting the server? Is the page refreshing because of a button click? Are you getting a status code of 200? Are you getting another status code? Is your function getting called?

You need to add debug statemenets to the code and see what is happening. You can do that with alerts or with console.log with Firebug.

Eric