![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
06/09/2004, 07:57
|
![Avatar de living](http://static.forosdelweb.com/customavatars/avatar65604_1.gif) | | | Fecha de Ingreso: mayo-2004
Mensajes: 1.266
Antigüedad: 20 años, 8 meses Puntos: 2 | |
yo haría lo siguiente:
Meter Ingresar_Maestro como un input hidden:
<input type="hidden" value="S" name="Ingresar_Maestro">
El botón hazlo en vez de tipo submit hazlo de tipo button y quita lo de Ingresar_Maestro:
<input name="registrar" type="button" id="registrar" value="Registrar" onclick="javascript:validar(this.form,'ing')">
y en la función validar...poner submit() al final del mismo. Un ejemplo:
function validar(formulario,'ing'){
if (formulario.campo.value==""){
alert("rellene el campo obligatorio");
return;
}
formulario.submit();
} |