Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

One form - 2 processing pages?

Status
Not open for further replies.

lb1

Technical User
Apr 19, 2002
109
US
I have one form where I would like to create 2 submit buttons.
One submit button pointing to Page 1 and another submit button pointing to Page 2. Since I can setup only one action="....." , Is there a way to do this, and what should I do?
Thanks in advance.
Louis
 
you can use javascript.

<form name=&quot;myForm&quot;>
<!--- content of form here -->
<input type=&quot;button&quot; onclick&quot;document.myForm.action = 'urlForProcessing.php'; document.myForm.submit();&quot; value=&quot;normal page&quot;>
<input type=&quot;button&quot; onclick&quot;document.myForm.action = 'urlForProcessing2.php'; document.myForm.submit();&quot; value=&quot;other page&quot;>
</form>

I hope this helps you out! :) Gary Haran
 
Thanks it does.
Louis
 
Gary, I have a problem with a form in a layer. I need two layers. The form layer is visible and the ThankYou layer is hidden. Once the user clicks on the submit button and the email is sent hide the form layer and show the ThankYou layer.

Thanks, for any help you can provide.

Wayne Jordan
 
you have to realize a few things here. A form when submitted sends the user to a new page.

You can make a thank you note appear prior to the page reloading to send the information a little later (say a few seconds later) programatically.

However you could potentially make people believe the submit already occured and tempt them to close the window as soon as they see &quot;thank you&quot; on screen.

Are you certain you want to do this? Gary Haran
 
Gary, maybe I should explain how the site works and then maybe you can point me in a better direction.

The root page has the navigation bar and graphics and stays static once clicks are made then the child page is all that is reloaded.

The child pages are links from the root page. Inside each child there may be links for more information and these are just layers inside the child page that I show/hide.

The basic concept of the site was to use layers in the child pages so that root page wouldn't have to reload as a click was made. That has been fine up to now. Once I started creating the forms I ran into the problem of the action sending the user to an unformatted page.

I'm open to ideas and here is the link to the test web site
Thanks, Wayne. Wayne Jordan &quot;The Computer Guru&quot;
Technical Director
Megabytes Computers & Networking, Inc.
Solve Your Computer Problem in Five Minutes at: Email - mailto:wayne@megabytescomputers.com
Toll Free - (888) 589-2655
Voice - (904) 880-6366
Fax - (904) 880-1560
Cell - (904) 333-2142
&quot;Teamwork is the fuel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top