Ver Mensaje Individual
  #2 (permalink)  
Antiguo 18/11/2004, 12:57
Avatar de xcorpyon
xcorpyon
 
Fecha de Ingreso: junio-2004
Mensajes: 52
Antigüedad: 20 años, 8 meses
Puntos: 0
mira a ver q tal esto (creo q era algun punto y coma el fallo)

Código PHP:
<SCRIPT>
function 
comprueba(formu) {
    if (
formu.nombre.value=="") {
        
alert("El campo NOMBRE está vacío.");
        
formu.nombre.focus();
        return (
false);
    }
    if (
formu.mismo.selectedIndex=="2") {
        if (
formu.nombre2.value=="") {
            
alert("El campo NOMBRE de Datos de Envío está vacío.");
            
formu.nombre2.focus()
            return (
false);
        }

    }
    return(
true);
}
</SCRIPT>


<form action="pagina.asp" name="form" onSubmit = "return comprueba(this);" method="post">
<tr>
    <th scope="row">Nombre:</th>
    <td>&nbsp;<input name="nombre" type="text"></td>
  </tr>
  
  <tr>
    <th scope="row" colspan="2">Datos de Envío.<br>
<input name="mismo" type="radio" onClick="desbloquea(this.form)" value="1" checked>Diferentes de Datos de Facturación<br>
<input name="mismo" type="radio"  onClick="bloquea(this.form)" value="2">Coincidentes con Datos de Facturación.</th>
  </tr>
  <tr>
    <th scope="row">Nombre de envío:</th>
    <td>&nbsp;<input name="nombre2" type="text"><br><input type="submit" name="juas" value="Aceptar"></td>
  </tr>
  <tr></form> 

Última edición por xcorpyon; 18/11/2004 a las 12:58