form with to submits, which one to default to? - PHP
This is a discussion on form with to submits, which one to default to? - PHP ; Hi
Say, I have a form.
Both cancel and save (in that order) are submits, then in the code I
check which button was pressed.
The point is that I want the save button (2nd) to be default, not the
...
-
form with to submits, which one to default to?
Hi
Say, I have a form.
Both cancel and save (in that order) are submits, then in the code I
check which button was pressed.
The point is that I want the save button (2nd) to be default, not the
cancel.
Is there a way (in js?) to "focus" the other button?
One other way to be some simple js, which submits the page anyway...
WBR
Sonnich
-
Re: form with to submits, which one to default to?
jodleren wrote:
> Hi
>
> Say, I have a form.
>
> Both cancel and save (in that order) are submits, then in the code I
> check which button was pressed.
> The point is that I want the save button (2nd) to be default, not the
> cancel.
>
> Is there a way (in js?) to "focus" the other button?
>
> One other way to be some simple js, which submits the page anyway...
>
> WBR
> Sonnich
>
Try a JS newsgroup. This one is for PHP - which can't do it.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
-
Re: form with to submits, which one to default to?
..oO(jodleren)
>Say, I have a form.
>
>Both cancel and save (in that order) are submits, then in the code I
>check which button was pressed.
>The point is that I want the save button (2nd) to be default, not the
>cancel.
>
>Is there a way (in js?) to "focus" the other button?
No. But why do you need a cancel button at all? Usually it's as useless
as a reset button.
>One other way to be some simple js, which submits the page anyway...
Even worse and unreliable.
Micha
-
Re: form with to submits, which one to default to?
> Both cancel and save (in that order) are submits, then in the code I
> check which button was pressed.
> The point is that I want the save button (2nd) to be default, not the
> cancel.
>
> Is there a way (in js?) to "focus" the other button?
As a dirty hack, you could make the second button come first in the HTML
and flip it over with a stylesheet.
Good luck
-
Re: form with to submits, which one to default to?
On Dec 4, 10:12 am, Dikkie Dik <dik...@nospam.org> wrote:
> > Both cancel and save (in that order) are submits, then in the code I
> > check which button was pressed.
> > The point is that I want the save button (2nd) to be default, not the
> > cancel.
>
> > Is there a way (in js?) to "focus" the other button?
>
> As a dirty hack, you could make the second button come first in the HTML
> and flip it over with a stylesheet.
>
> Good luck
HTML supports tabindex="#".
That ought to do.
Similar Threads
-
By Application Development in forum SendMail
Replies: 2
Last Post: 07-09-2007, 04:44 AM
-
By Application Development in forum Adobe Tools
Replies: 6
Last Post: 08-22-2006, 11:03 AM
-
By Application Development in forum Java
Replies: 6
Last Post: 03-20-2006, 09:43 AM
-
By Application Development in forum Microsoft Exchange
Replies: 0
Last Post: 12-21-2004, 04:23 AM
-
By Application Development in forum Perl
Replies: 1
Last Post: 07-21-2003, 12:00 AM