Ver Mensaje Individual
  #3 (permalink)  
Antiguo 08/02/2008, 10:24
nilram
 
Fecha de Ingreso: julio-2007
Mensajes: 14
Antigüedad: 16 años, 10 meses
Puntos: 0
Re: Select deriva Otro Select o Radio

hola q tal como estas?
estaba viendo tu sita q consegui mientras buscaba como solucionar mi problema
resulta q tengo el mismo problema q tenias tu con los selects anidados, de verdad que ya no se que hacer para solventarlo
este es mi codigo

function createRequest(){
var xmlhttp=false;
if(window.XMLHttpRequest){ // Mozilla, Safari,...
xmlhttp = new XMLHttpRequest();
if (xmlhttp.overrideMimeType) {
xmlhttp.overrideMimeType('text/xml');
}
}else if(window.ActiveXObject){ // IE
try{
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
}catch(e){
try{
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}catch(e){}
}
}
return xmlhttp;
}



function callback_aplicacion() {
var xmlhttp = createRequest();
if(!xmlhttp){
alert("No consegui el objeto XMLHttpObject");

}else{

Loadgif="Oficina <img src=\"imagenes/loader.gif\">";
document.getElementById("loader").innerHTML=Loadgi f;
var idEdo=document.getElementById("cmbEstado").value;
var url = "AjaxOficinaCTRL?idEdo=" + escape(idEdo);
xmlhttp.open("GET", url, true);
xmlhttp.onreadystatechange= function(){
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
var oficina = xmlhttp.responseXML.getElementsByTagName("oficina" );
lista="<select name=\"cmbOficina\" id=\"cmbOficina\" style=\"width:330px;\" >";
lista+="<option value=\"0\" selected=\"selected\">Seleccione</option>";
for(i=0;i<oficina.length;i++){ //.attributes[0].nodeValue
lista+=" <option value=\""+oficina[i].attributes[0].nodeValue+"\">"+oficina[i].childNodes[0].nodeValue+"</option>";
}
lista+="</select>";

document.getElementById("lista").innerHTML=lista;
Loadgif="Oficina";
document.getElementById("loader").innerHTML=Loadgi f;
}
}; // fin del function
xmlhttp.send(null);
} //fin del else

}// fin de la funcion callback_aplicacion

me dice que el objeto no acepta esta propiedad o metodo y se para en el momento q llama a la funcion
xmlhttp.onreadystatechange= function()
y se queda cragado el segundo select pero no termina en mozilla me funciona perfecto pero necesito que funcione en IE, no se si es algo de configuracion del explorador o es otra cosa
porfa si me puedes ayudar o cualquiera me puede ayudar se lo agradezco