This has the functionality to give click to call this function goLostpass; but it does not show me the message ie it does not go into onreadystatechange. The alert is to look for the error
function goLostpass() {
// window.alert('Se presiono ENTER');
var connect, form, response, result, email;
email = __('email_lostpass').value;
if (email != '') {
form = 'email=' + email;
connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');
connect.onreadystatechange = function(){
alert("Estoy aqui");
if (connect.readyState == 4 && connect.status == 200) {
if (connect.responseText == 1) {
result = '1==1';
__('_AJAX_LOSTPASS_').innerHTML = result;
location.reload();
}else{
result = '1=x1';
__('_AJAX_LOSTPASS_').innerHTML = result;
}
}else if (connect.readyState != 4){
result = '1==2';
__('_AJAX_LOSTPASS_').innerHTML = result;
}
connect.open('POST','ajax.php?mode=lostpass',true);
connect.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
connect.send(form);
}
}else {
result = '1==3';
__('_AJAX_LOSTPASS_').innerHTML = result;
}
}