Re: multiple submit buttons
| From: | Pascal Jolin | Date: | Sat, 25 Nov 2000 07:43:51 +0000 |
| Subject: | Re: multiple submit buttons | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-27110@lists.php.net to get a copy of this message | ||
This would have to be done with client-side scripts.
Your two buttons would have to be normal <input type="button" ...>
and not submit buttons.
You would need to have a hidden field in your form in which you
will store the action that the user wants to take.
<input type="hidden" name="command" value="">
Then both buttons need to have client-side script attached that will
put a value in the "command" hidden field (say, "open" or "delete")
and call the form's submit method.
I won't embarass myself by trying to give you sample code, since
I'm particularily inept at client-side scripting - but that's the way to
do what you need.
Pascal Jolin
Tradextreme
----- Original Message -----
From: "Deepak Chawla" <dchawla@usa.unl.edu>
To: <php-general@lists.php.net>
Sent: Saturday, November 25, 2000 2:39 AM
Subject: [PHP] multiple submit buttons
> Hi all,
>
> I need two submit buttons in a html form, and i need them to do two
> different things...eg: a text box for a filename and two submit buttons,
> one for opening the file and another for deleting it. Since both require
> the filename field.. both have to be submit buttons.
> html in itself doesn't provide means for doing this... is there any way
> to do it ??
>
> regards
> -deepak
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
----- Original Message -----
From: "Deepak Chawla" <dchawla@usa.unl.edu>
To: <php-general@lists.php.net>
Sent: Saturday, November 25, 2000 2:39 AM
Subject: [PHP] multiple submit buttons
> Hi all,
>
> I need two submit buttons in a html form, and i need them to do two
> different things...eg: a text box for a filename and two submit buttons,
> one for opening the file and another for deleting it. Since both require
> the filename field.. both have to be submit buttons.
> html in itself doesn't provide means for doing this... is there any way
> to do it ??
>
> regards
> -deepak
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>