Quiero que muestre un mensaje pero me sale esto :
ReferenceError: __ is not defined _______ goLogin/connect.onreadystatechange
Generales.js
function __(id){
return document.getElementById(id);
}
//-----------------------------
<div id="_AJAX_LOGIN_"></div>
<script src="views/app/js/login.js"></script>
function goLogin() {
// window.alert('Se presiono ENTER');
var connect, form, response, result;
form = 'variable=contenido';
connect = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');
connect.onreadystatechange = function(){
if (connect.readyState == 4 && connect.status == 200) {
if (connect.responseText == 1) {
result = '<div class="alert alert-dismissible alert-success">';
result += '<h4>Conectado</h4>';
result += '<p><strong>Estamos Redireccionandote...</strong></p>';
result += '</div>';
__('_AJAX_LOGIN_').innerHTML = result;
location.reload();
}else{
__('_AJAX_LOGIN_').innerHTML = connect.responseText;
}
}else if (connect.readyState != 4){
result = '<div class="alert alert-dismissible alert-warning">';
result += '<button type="button" class="close" data-dismiss="alert">X</button>';
result += '<h4>Procesando...</h4>';
result += '<p><strong>Estamos intentando Logearte...</strong></p>';
result += '</div>';
}
}
connect.open('POST','ajax.php?mode=login',true);
connect.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
connect.send(form);
}//FIn de goLogin