Ver Mensaje Individual
  #4 (permalink)  
Antiguo 09/03/2010, 09:31
Avatar de greenhell
greenhell
 
Fecha de Ingreso: marzo-2010
Mensajes: 8
Antigüedad: 14 años, 3 meses
Puntos: 0
Respuesta: problema con documen.getElementByid()

muchas gracias ya resolvi el problema como tu dices solo tube ke modifikar un poko la funcion de mi ajax y le agregue el foco en el onready cuando es igual a 4 aka pongo el codigo por si a alguien le sirve:

Código PHP:
function nuevoAjax(){
var 
xmlhttp=false;
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (
e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (
E) {
xmlhttp false;
}
}

if (!
xmlhttp && typeof XMLHttpRequest!='undefined') {
xmlhttp = new XMLHttpRequest();
}
return 
xmlhttp;
}
//*****************************************
function FAjax_jr(url,div,control){
var 
t1contenedor;
contenedor document.getElementById(div);
ajax=nuevoAjax();
ajax.open("GET"url,true);
ajax.onreadystatechange=function() {
 if (
ajax.readyState==2)
 {
     
contenedor.innerHTML="Cargando.......";
 }
if (
ajax.readyState==4)
{
    
contenedor.innerHTML ajax.responseText
    
if((control==null) || (control=="")){}
    else{
foco(control)}
}
}
ajax.send(null)