Ver Mensaje Individual
  #8 (permalink)  
Antiguo 07/04/2011, 08:03
Ibiza3
 
Fecha de Ingreso: noviembre-2006
Mensajes: 49
Antigüedad: 17 años, 6 meses
Puntos: 0
Respuesta: Explorer Saca Errores - Firefoz No

Bueno ya probe lo que me dijieron...

Código HTML:
var celdas=document.getElementById(box.parentNode.pare ntNode.id).getElementsByTagName('input');
Es obligatorio, pues quiero trabajar sobre una fila de una tabla, que tiene un id especifico.

El cambio de
Código HTML:
onclick="check(this.checked, this, this.form);"
a
Código HTML:
onclick="check(this);"
no hizo que funcionara en IE8

Les copio mas partes del codigo, no lo copio completo por que siento que la gente se desanima al ver un codigo largo, no??? ajajja


GRacias!!

Código HTML:
function check(nocheck, box, thisform){
	// alert(b);document.miFormulario.miCheck.click()
	if(nocheck){	//No esta chequeado, primero envio el formulario luego lo desabilito (a)
	var celdas=document.getElementById(box.parentNode.parentNode.id).getElementsByTagName("input");
		var bool = verifyIP(celdas[2].value);
			if(bool){
			celdas[7].checked=0 
			return;
			}
		celdas[5].disabled = '';
		alert('C' + celdas[7].value + 'exion iniciada');
		total = celdas.length;
		for(i=0; i<total-1; i ++){
		thisform.submit();
		celdas[i].disabled = 'disabled';
		}
	}else{	//Esta chequeado, primero lo habilito y envio el formulario (r)
	var celdas=document.getElementById(box.parentNode.parentNode.id).getElementsByTagName("input");
		total = celdas.length;
		for(i=0; i<total-1; i ++){
			celdas[i].disabled = '';
		}
	thisform.submit();
	celdas[6].checked=0
	send(false,el,thisform);
	}
	}
		
	function send(nocheck, box, thisform){
	if(nocheck){	//No esta chequeado, primero envio el formulario luego lo desabilito (a)
	var celdas=document.getElementById(box.parentNode.parentNode.id).getElementsByTagName("input");
	alert("before de var");
		var bool = verifyIP(celdas[2].value);
			alert("after var")
			if(bool){
			celdas[6].checked=0 
			return;
			}
			
		thisform.submit();
		celdas[2].readOnly = nocheck? 'true' : '';
		celdas[3].readOnly = nocheck? 'true' : '';
		celdas[4].readOnly = nocheck? 'true' : '';
		celdas[5].disabled = 'disabled';
		celdas[7].checked=1
		check(true,box,thisform);
	}else{	//Esta chequeado, primero lo habilito y envio el formulario (r)
	var celdas=document.getElementById(box.parentNode.parentNode.id).getElementsByTagName("input");
		celdas[2].readOnly = nocheck? 'true' : '';
		celdas[3].readOnly = nocheck? 'true' : '';
		celdas[4].readOnly = nocheck? 'true' : '';
		celdas[5].disabled = '';
		alert('C' + celdas[6].value + 'exion terminada');
	thisform.submit();
	// alert("Si paso por aqui");
	}
	}
Código HTML:
<tr id="celda" >
      <form action="Main.php" method="POST" target ="mainFrame" name="form">
          <td><input type='hidden' size="10" name='name' value='<?php echo $_SESSION['username']?>' readonly="readonly" /></td>
          <td align="center"><input type="text" name="IPini" value="<?php echo "{$_SERVER["REMOTE_ADDR"]}"?>" readonly="readonly" /></td>
          <td align="center"><input type="text" name="IPfin" value="10.201." maxlength="14"/></td>
          <td align="center"><input type="text" name="ancho" value="0" size="8" maxlength="8"/></td>
          <td align="center"><input type="text" name="delay" value="0" size="8" maxlength="3"/></td>
          <td align="center"><input type="checkbox" name="simetrico" checked /></td>
          <td align="center"><input type="checkbox" name="graficar" onclick="send(this.checked, this, this.form);" /></td>
          <td align="center"><input type="checkbox" name="status" onclick="check(this.checked, this, this.form);" /></td>
        </form>
      </tr>