20/05/2007, 21:07
|
| | Fecha de Ingreso: abril-2006
Mensajes: 119
Antigüedad: 18 años, 8 meses Puntos: 0 | |
Siempre el mismo peleador... EL IE.. ( Te odio... ) Hola. Miren este codigo... Cita: function newAjax(){var xmlHttp=null;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
// Internet Explorer
try
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlHttp;
}
function newAjax2(){var xmlHttp2=null;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttp2=new XMLHttpRequest();
}
catch (e)
{
// Internet Explorer
try
{
xmlHttp2=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
xmlHttp2=new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlHttp2;
}
function loginForm(show,loadingTxt){
var content, preloader;
content = document.getElementById('content');
preloader = document.getElementById('preloader');
loginBox = document.getElementById('login_box');
ajax=newAjax();
ajax.open("GET",show+'.php',true);
ajax.onreadystatechange=function(){
if(ajax.readyState==1){
preloader.innerHTML = loadingTxt;
preloader.style.background = "url('loading.gif') no-repeat center";
}else if(ajax.readyState==4){
if(ajax.status==200){
content.innerHTML = ajax.responseText;
preloader.innerHTML = "";
preloader.style.background = "none";
}
}
}
ajax.send(null);
}
function checkLoginUsername(username){
ajaxU=newAjax();
ajaxU.onreadystatechange=stateChangedUser;
ajaxU.open("GET","checkLoginAjax.php?type=only_use r&u="+ username +"",true);
ajaxU.send(null);
}
function showLanguageText(first,second){
language=newAjax2();
language.open("GET",'showLanguageText.php?first='+ first +'&second='+ second +'',true);
language.onreadystatechange=stateLanguageText;
language.send(null);
}
function stateLanguageText()
{
if (language.readyState==4)
{
error = document.getElementById('error');
error.innerHTML = language.responseText;
}
}
function stateChangedUser()
{
if (ajaxU.readyState==4)
{
if(ajaxU.responseText<1){
mensaje3 = showLanguageText('login','incorrect_username');
document.login.password.disabled=true;
document.login.button.disabled=true;
} else {
error = document.getElementById('error');
error.innerHTML = "";
document.login.password.disabled=false;
}
}
}
function checkLoginPassword(username,password){
ajax=newAjax();
ajax.onreadystatechange=stateChangedPassword;
ajax.open("GET","checkLoginAjax.php?type=complete& p="+password+"&u="+username+"",true);
ajax.send(null);
}
function stateChangedPassword()
{
error = document.getElementById('error');
if (ajax.readyState==4)
{
if(ajax.responseText<1){
mensaje2 = showLanguageText('login','incorrect_password');
document.login.button.disabled=true;
} else {
error = document.getElementById('error');
error.innerHTML = "";
document.login.button.disabled=false;
mensaje2 = showLanguageText('login','login_now');
}
}
} Cuando lo pruebo. el ie me dice:
Linea = 4
Car = 1
Error = Se esperaba un objeto
Codigo = 0
URL = http://localhost/rocp/ |