Ver Mensaje Individual
  #1 (permalink)  
Antiguo 29/01/2004, 15:25
araujo_guntin
 
Fecha de Ingreso: febrero-2003
Mensajes: 165
Antigüedad: 21 años, 3 meses
Puntos: 0
problema al validar

Hola ...

He intentado utilizar un script que encontré en este foro pero me da error cuando se ejecuta. Programo en php pero necesito hacer algunas validaciones del lado del cliente.

<script language="javascript">
<!--
function comprobarSelect(){
//var a=document.form1.codihote.value;
var a=document.getElementById("idDelTag").value;
var b=document.getElementById("sel1").value;
var c=document.getElementById("sel2").value;
var d=document.getElementById("idDelema").value;
var e=document.getElementById("idDelnom").value;
if(a=="" && b=="" && c=="" && d=="" && e==""){
return false;
} return true
}
-->
</script>

<form method="post" name="buscar_reserv" action="index_home.php?idBody=index_reserv&idBusca r=2" onsubmit="return comprobarSelect()">
<table width="65%" class="Current2" border="0" cellspacing="6" cellpadding="0">
<tr><td class="info" align="center" colspan="6">Buscar por Criterios</td></tr>
<tr>
<td width="13%" class="info" align="right">Reserva#:</td>
<td width="12%"> <select class='fecha1' name='codires1' id="idDelTag">
<option value="" selected>#</option>
<?php
while($row_tres1= mysql_fetch_array($result_tres1)) {
?>
<OPTION value="<?php echo $row_tres1['codires1']; ?>"><?php echo $row_tres1['codires1']; ?></option>
<?php
}
?>
</select> </td>
<td colspan="3" align="right" class="info">Per&iacute;odo&nbsp;&nbsp;&nbsp;del:& nbsp;&nbsp;
<input class="fecha1" type="text" height="15" name="finires1" id="sel1" size="10" value="" onFocus="return showCalendar('sel1', 'M/dd/y');" onClick="return showCalendar('sel1', 'M/dd/y');" >
al:&nbsp;&nbsp; <input class="fecha1" type="text" height="15" name="ffinres1" id="sel2" size="10" value="" onFocus="return showCalendar('sel2', 'M/dd/y');" onClick="return showCalendar('sel2', 'M/dd/y');" ></td>
</tr>
<tr>
<td colspan="5" bgcolor="#0033CC" height="1"></td>
</tr>
<tr>
<td height="10" class="info" align="right" valign="middle">Usuarios:</td>
<td class="info" align="right" valign="middle">Email:</td>
<td width="20%" class="info" align="center" valign="middle">
<select class='fecha1' name='mailuser' id='idDelema'>
<option value="" selected>--Seleccione--</option>
<?php

while($row_userres1= mysql_fetch_array($result_userres1)) {
?>
<OPTION value="<?php echo $row_userres1['userres1']; ?>"><?php echo mailuser($row_userres1['userres1']); ?></option>
<?php
}
?>
</select></td>
<td width="12%" align="right" valign="middle" class="info">Nombre:</td>
<td width="43%" valign="middle"> <select class='fecha1' name='nombuser' id="idDelnom">
<option value="" selected>--Seleccione--</option>
<?php
mysql_data_seek ($result_userres1,0);
while($row_userres1= mysql_fetch_array($result_userres1)) {
?>
<option value="<?php echo $row_userres1['userres1']; ?>"><?php echo nombuser($row_userres1['userres1']); ?></option>
<?php
}
?>
</select></td>
</tr>
<tr>
<td colspan="5" bgcolor="#0033CC" height="1"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2" align="center"><a class="info" href="index_home.php?idBody=index_reserv&idBuscar= 1">Mostrar
todos</a></td>
<td>&nbsp;</td>
<td align="right"><input type="submit" name="submit" value="Buscar" class="fecha1"></td>
</tr>
</table>
</form>