Re: 1 Form, 2 Actions?
- From: "Jamie Meyers" <gtg061q@xxxxxxxxxxxxxxx>
- Date: Thu, 30 Mar 2006 16:16:00 -0500
You can use JavaScript to change the action of the form. Just name the form
(with id), and use a x = document.getElementById(id); x.action =
"blah.php". Use that in accordance to a certain action of the form (like
choosing a ratio button).
"Mark" <Mark.Fenbers@xxxxxxxx> wrote in message
news:e0gjmt$gbg$1@xxxxxxxxxxxxxxxxxxxxx
I have a lengthy form (i.e., many inputs) on my form.php page. What's
different about this form than many others I've created is that I want the
user to have a choice of submitting this form data to one of two pages,
choice1.php or choice2.php, both of which read $_POST data from the form.
Obviously, a 'submit' button will send the user to the page specified by
the form's 'action=' setting, so I would have to employ some sort of
trick. But this is where I'm drawing a blank! What combination of PHP,
Javascript, and HTML would do the trick?
Thanks!
Mark
.
- References:
- 1 Form, 2 Actions?
- From: Mark
- 1 Form, 2 Actions?
- Prev by Date: Re: php/RSS question
- Next by Date: Re: JavaScript to PHP?
- Previous by thread: Re: 1 Form, 2 Actions?
- Next by thread: Re: 1 Form, 2 Actions?
- Index(es):