Código PHP:
<?php
$i=1;
?>
<html>
<head>
<script type="text/javascript">
function evento(id,val,num){
if(val==false){
document.getElementById('eventos'+id+num).style.display = 'block';
}else{
document.getElementById('evento'+id+num).style.display = 'block';
}
}
function cancela(id,val,num){
if(val==false){
alert("entro aqui");
document.getElementById('eventos'+id+num).style.display = 'none';
}else{
document.getElementById('evento'+id+num).style.display = 'none';
}
}
</script>
</head>
<body>
<table width="400" border="1" align="center" bordercolor="#333333">
<tr>
<td colspan="2" onClick="evento(<?php echo $i;?>,false,1)">
<div align="center" id="eventos<?php echo $i."1";?>" style="display:none; position:absolute">
<form action="fecha.php" method="post" enctype="multipart/form-data" name="form1">
<input type="submit" name="Submit" value="Enviar">
<input type="button" name="Button" value="Cancelar" onClick="cancela(<?php echo $i;?>,false,1)" >
</form>
</div>
</td>
</tr>
</table>
</body>
</html>
el problema se presenta en el boton cancela
Código HTML:
<input type="button" name="Button" value="Cancelar" onClick="cancela(<?php echo $i;?>,false,1)" >