Re: JavaScript and Submit
| From: | elias | Date: | Thu, 29 Mar 2001 00:59:38 +0000 |
| Subject: | Re: JavaScript and Submit | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-45900@lists.php.net to get a copy of this message | ||
Exactly, that how i'm doing at the moment, adding a hidden form that get
changed after the onclick event of any of my fake submit buttons and even my
<a href="#"> objects.
"Renze Munnik" <renze@datalink.nl> wrote in message
news:3AC1BAE7.A69A6D96@datalink.nl...
> Ehhh... do you want to have them all go to the same page after a
> submit?
>
> With real submit buttons:
> If you don't, you can just change the 'action' of your form at the
> moment that someone pushes one of the submit-buttons.
>
> With 'fake' submit buttons:
> Otherwise (if they all have to go to the same page) I'd say you can
> just add a hidden field e.g. and set the value to either 'sbm_1',
> 'sbm_2' or whatever, at the moment someone pushes the button. Then
> at the 'result-page' you can check that field and look what the
> value is. Another way is (if you want to use the exact check as
> you've described) to create three hidden fields (submit1, submit2
> and submit3) and assign a value to the one corresponding to the
> pushed button.
>
> RenzE
>
>
> elias wrote:
> >
> > Actually, when I want to submit a form programmatically i do
myform.submit()
> > but what if i got like 3 submit buttons and each one with a name?
> > ie: submit1 button, submit2 button, and submit3 button.
> > if the users clicks on of them, i can check in the action file like:
> > if (isset($submit1)) { ... }
> > elseif (isset($submit2)) { ... }
> >
> > but programmatically, how can i write a code that simulates the submit2
> > click, so the last check (i just wrote) can really say that submit2 was
> > clicked and continues?
> >
> > Sorry for poor english, hope i expressed my idea as I'm asking...
> >
> > -elias
> >
> > --
> > 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
>
> --
> 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
>