RE: [PHP-ES] Deshabilitar enter con submit
| From: | Hubert Abasto | Date: | Fri, 19 Apr 2002 20:45:24 +0000 |
| Subject: | RE: [PHP-ES] Deshabilitar enter con submit | ||
| References: | 1 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-21695@lists.php.net to get a copy of this message | ||
Mil gracias funciona asi.
Saludos
> -----Mensaje original-----
> De: Angel Priede [mailto:apriede@americatel.net]
> Enviado el: viernes, 19 de abril de 2002 16:25
> Para: lista@phpes.com
> Asunto: Re: [PHP-ES] Deshabilitar enter con submit
>
>
>
> con la solucion que yo te suguiero en el mail anterior puedes
> hacer eso
> justamente.
>
> Solo tienes que cambiar un poco tu funcion javascript que hace la
> validacion,que en este momento guarda un true o false en la
> variable val,
> entonces enrealidad tienes que hacer que haga un
> document.form.submit() y
> entonces poner la funcion en el onclick del boton y eliminar
> el onsubmit que
> tienes actualmente.
>
>
> On Friday 19 April 2002 15:23, you wrote:
> > Vik
> >
> > La solución esta muy bien, pero el problema que tengo es este.
> >
> > Tengo un script de validación que activo con:
> >
> > <form method=get action="sol_add.php" name="sol"
> > onSubmit="validate();return returnVal;">
> >
> > cuando uso <input type=submit.... el validador de datos
> trabaja muy bien,
> > pero el formulario hace submit con ENTER cosa que quiero evitar.
> >
> > Luego si modifico el boton a la forma:
> >
> > <input type=button value="Enviar Datos"
> onclick=document.sol.submit()>
> >
> > Ya no se hace submit con presionar <ENTER>, pero el
> validador de datos
> > validate() ya nose activa con el evento submit.
> >
> > Es decir que mi problema resulta en tener al mismo tiempo
> la validación por
> > el evento submit y evitar que <ENTER> haga submit del formulario.
> >
> > Gracias por la ayuda me sirve tambien pero no en este caso.
> >
> > Saludos cordiales
> >
> > > -----Mensaje original-----
> > > De: Conocimiento Virtual [mailto:conocimientovirtual@epm.net.co]
> > > Enviado el: viernes, 19 de abril de 2002 14:56
> > > Para: lista@phpes.com
> > > Asunto: RE: [PHP-ES] Deshabilitar enter con submit
> > >
> > >
> > > Hubert!!!
> > >
> > > Claro que si se que ejecuta el onsubmit. Si tú en el botón
> > > haces algo como
> > > esto:
> > > -----------------------------------
> > > <form name=frmPrueba...>
> > > ...
> > > <input type=button value="Enviar Datos"
> > > onclick=document.frmPrueba.submit()>
> > > </form>
> > > -----------------------------------
> > > Entonces al darle click al botón es como si fuera un submit
> > > button, pero si
> > > le das enter, no pasa nada (a menos de que tengas el foco
> > > sobre el botón).
> > >
> > > Speruabertiayudao.
> > >
> > > Vik! ®
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From: Hubert Abasto <habasto@bcb.gov.bo>
> > > To: <lista@phpes.com>
> > > Sent: Friday, April 19, 2002 12:49 PM
> > > Subject: RE: [PHP-ES] Deshabilitar enter con submit
> > >
> > > > Saludos
> > > >
> > > > Esta solución esta bien ,pero en el form tengo el evento
> > >
> > > OnSubmit para
> > >
> > > > validar datos, resulta que cuando reemplazo submit por
> > >
> > > button ya no se
> > >
> > > > ejecuta el validador de datos. Hay otra forma??
> > > >
> > > > gracias
> > > >
> > > > > -----Mensaje original-----
> > > > > De: Ignacio Napal [mailto:inapal@equiplus.com]
> > > > > Enviado el: viernes, 19 de abril de 2002 12:22
> > > > > Para: lista@phpes.com
> > > > > Asunto: Re: [PHP-ES] Deshabilitar enter con submit
> > > > >
> > > > >
> > > > > No declares el botón de tipo "Submit", sino de tipo
> > > > > "Button",
> > > > > y dispara el
> > > > > submit con el evento "onClick" del mismo.
> > > > >
> > > > > Ignacio.
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "Hubert Abasto" <habasto@bcb.gov.bo>
> > > > > To: <lista@phpes.com>
> > > > > Sent: Friday, April 19, 2002 1:07 PM
> > > > > Subject: [PHP-ES] Deshabilitar enter con submit
> > > > >
> > > > > > Saludos a la lista.
> > > > > >
> > > > > > Una pregunta fácil, quiero que al llenar un formulario
> > > > >
> > > > > <ENTER> no haga
> > > > >
> > > > > > submit del mismo sino solo click en el boton
> correspondiente.
> > > > > >
> > > > > > Gracias
> > >
> > >
> ---------------------------------------------------------------------
> > >
> > > > > > Archivo On-line:
> > > > > > http://www.phpes.com/
> > > > > > via news: news://news.phpes.com/
> > > > > > Manual PHP en español:
> > > > > > http://www.php.net/manual/es/
> > > > > > Para dar de baja la suscripción, mande un mensaje a:
> > > > > > lista-unsubscribe@phpes.com
> > >
> > >
> ---------------------------------------------------------------------
> > >
> > > > > Archivo On-line: http://www.phpes.com/
> > > > > via news: news://news.phpes.com/
> > > > > Manual PHP en español:
> > > > > http://www.php.net/manual/es/
> > > > > Para dar de baja la suscripción, mande un mensaje a:
> > > > > lista-unsubscribe@phpes.com
> > >
> > >
> ---------------------------------------------------------------------
> > >
> > > > Archivo On-line: http://www.phpes.com/
> > > > via news: news://news.phpes.com/
> > > > Manual PHP en español: ϴ<
> > > > Ð=ngÄ"=a1øhttp://www.php.net/manual/es/
> > > > Para dar de baja la suscripción, mande un mensaje a:
> > > > lista-unsubscribe@phpes.com
> > >
> > >
> ---------------------------------------------------------------------
> > > Archivo On-line: http://www.phpes.com/
> > > via news: news://news.phpes.com/
> > > Manual PHP en español: http://www.php.net/manual/es/
> > > Para dar de baja la suscripción, mande un mensaje a:
> > > lista-unsubscribe@phpes.com
> >
> >
> ---------------------------------------------------------------------
> > Archivo On-line: http://www.phpes.com/
> > via news: news://news.phpes.com/
> > Manual PHP en español: http://www.php.net/manual/es/
> > Para dar de baja la suscripción, mande un mensaje a:
> > lista-unsubscribe@phpes.com
>
> ---------------------------------------------------------------------
> Archivo On-line: http://www.phpes.com/
> via news: news://news.phpes.com/
> Manual PHP en español: http://www.php.net/manual/es/
> Para dar de baja la suscripción, mande un mensaje a:
> lista-unsubscribe@phpes.com
>