Advanced Search

Results 1 to 4 of 4

Thread: Is it possible to process my form in two ways?

  1. #1
    Join Date
    Jun 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Is it possible to process my form in two ways?

    I don't have access to the server where the ASP script resides, thats why im asking this question. Can I have my form process through scripts server, but also send a copy to my email on the form's inputed fields? I've attached the form.

    Thanks, greatly appreciate any help!

    The form is at this link, can't attach it:

    http://www.mightymarketing.com/daler...aluation7.html

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,156
    Thanks
    262
    Thanked 690 Times in 678 Posts

    Default

    No. You cannot submit a form twice. A form goes one place and the user then continues from that page.

    You could recreate the ASP code, or you could create a page that generates hidden fields from the sent POST data after processing it, then asks the user to submit the new form (same info) by pressing a "Continue" [submit] button.

    You could also process the post data yourself then forward this from your server to the ASP form on the other server. I don't know how using ASP, but in PHP there is a set of functions called "curl" that allow a post call 'behind the scenes' from the user. So you could use that.


    But this is all very high level, advanced programming. There should be an easier way. If you MUST do this and absolutely cannot get access to the ASP or copy the ASP script on your own server, then I guess you'll have to try it using one of the methods above.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Nov 2008
    Posts
    58
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Default

    Yes, It is possible. You can submit the same form to different scripts.

    The page below contains examples and sample code.

    How to create a multi-submit form

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,156
    Thanks
    262
    Thanked 690 Times in 678 Posts

    Default

    Relying on Javascript like that is a terrible idea. It's possible to use Javascript, yes. But if the user does not have Javascript or for some reason wants to avoid using Javascript on the page (intentionally submitting the form incorrectly?), then it will not work and it will submit, at most, once, or potentially not at all if the Javascript doesn't "fall back" well to normal methods.

    If you use that Javascript method as an OPTIONAL addition (so only one submission is required and the second is a bonus), that's fine.
    Or you can use the Javascript to make it smooth and have some other fall back option that doesn't rely on that for users who don't have/use Javascript.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •