Foros del Web » Programación para mayores de 30 ;) » Java »

cargar combobox dependientes

Estas en el tema de cargar combobox dependientes en el foro de Java en Foros del Web. hola a todos tengo el siguiente codigo de javascript que en firefox funciona perfectamente pero en IE no produce ningun efecto: function nuevoAjax(){ var xmlhttp=false; ...
  #1 (permalink)  
Antiguo 29/01/2009, 09:11
 
Fecha de Ingreso: enero-2009
Mensajes: 8
Antigüedad: 15 años, 3 meses
Puntos: 0
cargar combobox dependientes

hola a todos tengo el siguiente codigo de javascript que en firefox funciona perfectamente pero en IE no produce ningun efecto:


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 cargar_contratos()
{
var Cliente=document.getElementById("selectCliente").o ptions[document.getElementById("selectCliente").selectedI ndex].value;
ajax=nuevoAjax();
ajax.open("GET", "Contratos.php?Cliente="+Cliente, true);
ajax.onreadystatechange=function()
{
if (ajax.readyState==4)
{
obXML = ajax.responseText;

for (var i=0; i<obXML.length;i++) {
document.form1.selectContrato.parentNode.innerHTML =obXML;
}
}
}
ajax.send(null);
}


function cargar_Actividades()
{
var Actividad=document.getElementById("selectContrato" ).options[document.getElementById("selectContrato").selected Index].value;
ajax=nuevoAjax();
ajax.open("GET", "Actividad.php?Actividad="+Actividad, true);
ajax.onreadystatechange=function()
{
if (ajax.readyState==4)
{
obXML = ajax.responseText;
for (var i=0; i<obXML.length;i++) {
document.form1.selectActividad.parentNode.innerHTM L=obXML;
}
}
}
ajax.send(null);
}
con cada funcion cargo un combo si alguien me puede ayudar me seria de
mucha ayuda
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 00:22.