Ver Mensaje Individual
  #6 (permalink)  
Antiguo 03/11/2009, 12:23
Avatar de syntex
syntex
 
Fecha de Ingreso: noviembre-2002
Ubicación: Cataluña
Mensajes: 978
Antigüedad: 21 años, 6 meses
Puntos: 4
Respuesta: Problemas al cargar <div con un checkbox

E puesto en el body onload así y tampoco me funciona

<html>
<head>
<title>CB Hide/Show</title>
<script type="text/javascript">
<!--
function showMe (it, box) {
var vis = (box.checked) ? "block" : "none";
document.getElementById(it).style.display = vis;
}
//-->
</script>
</head>
<body onload="showMe()">
<form action="" method="get">
<? if ($_GET[c1] == "si"){$ZX1 = "checked";} ?>
<input type="checkbox" name="c1" onClick="showMe('div1', this)" value="si" <? echo $ZX1; ?>>Show Hide Checkbox
<div id="div1" style="display:none">
<table border=1 id="t1">
<tr>
<td>i am here!</td>
</tr>
</table>
</div>
<input type="submit" value="">
</form>
</body>
</html>

Pero cuando le doy al submit tampoco me funciona
__________________
------------------------------------------------
La paciencia es el rey de la ciencia
------------------------------------------------