[thelist] Multiple Form Actions, One Button?

Tom Dell'Aringa pixelmech at yahoo.com
Wed Aug 21 16:20:00 CDT 2002


Stephen,

You could write a function that fires off on the onSubmit event of
the form, that takes care of the two functions, for example:

function doMyStuff()
{
  document.myForm.submit() // submit your form for next page
  document.myForm2.submit() // submit a form that mails you etc
}

It doesn't have to be a second form that mails you, it could be
another script or somesuch. Now, this breaks if the user doesn't have
JS enabled, so you could take that into consideration, check your
logs for how many people that might affect, and how important this
is.

HTH

Tom

--- Stephen Voss <steve at stephenvoss.com> wrote:
> Hi,
> I'm looking to have a form that, when filled out and the submit
> button is
> pressed, performs two actions:
> 1) Sends e-mail w/ contents of form to me:
> <form action="FormMail.cgi" method="POST">
> <input type=hidden name="recipient" value="myemail at mail.com">
>
> 2) Passes form data along to next page (where some javascript
> displays the
> data):
> <form type=get action="next-page.html">
>
> My question is, is this possible? My client would love to have this
> done,
> but I'm clueless as to the implementation.
>
> thanks,
> Stephen Voss
> http://www.stephenvoss.com/
>
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !


=====
var me = tom.pixelmech.webDeveloper();

http://www.pixelmech.com/
http://www.maccaws.com/
[Making A Commercial Case for Adopting Web Standards]

__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com



More information about the thelist mailing list