[thelist] 1 form, 2 destinations
Peter Brunone (EasyListBox.com)
peter at easylistbox.com
Thu Jul 29 09:17:40 CDT 2004
You'll probably need to forego the usual Submit button. Use a Javascript button instead, that triggers a function which submits the form, then changes the action and submits again.
Cheers,
Peter
Original Message:
>From: Rob Smith <rob.smith at THERMON.com>
>To: "Thelist (E-mail)" <thelist at lists.evolt.org>
>Subject: [thelist] 1 form, 2 destinations
>Date: Thu, 29 Jul 2004 08:32:30 -0500
>Hi,
>
>I want to start your creative juices this morning with an interesting
>problem. I have one form (method="POST"), and I want the form data sent to
>two places. The primary action of the form is and has to remain pointing to
>another server (Pay pal for example), and I want the form data to also go
>somewhere else?
>
>I would really like to open the Pay pal screen in a new window, so the
>customer can pay, as well as send the form data to a order submission
>process to email customer service there's a new order or what have you.
>
>I was hoping to do something like this:
>
><form action="https://www.paypal.com/cgi-bin/webscr" method="post"
>target="_blank" onSubmit="window.location.href='ThankYou.asp'">
>...
><input type="image" src="grfx/ProceedToCheckout.gif" name="submit"
>width="200" height="35">
></form>
>
>But this goes to the ThankYou.asp page, not to the action page.
>
>
>The other creative way I was thinking about doing this is like so:
>
>1. Proceed to check out
>2. Checkout clicked
>3. Change action to order submit page
>4. Submit order to Customer Service via email
>5. Direct browser to a page with all the previous form data
>6. New page has onLoad=Form.submit with all the form data from before
>7. Customer pays
>8. Fill the order pending payment received
>9. Ship Goods
>10. Inform Customer of Tracking Number
>
>Basically, you're achieving the 1 form, with 2 destinations problem, but in
>the background, it's really two forms with two destinations, and one action.
>
>Thanks for your input,
>
>Rob Smith
>--
More information about the thelist
mailing list