Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2013
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Javascript Form Question

    Hi,

    I hope someone can help me with this question. I have a form on my site that submits the details through to paypal of a persons name and address and how many tickets they want for an event so they dont have to fill in their details again when they reach the payflow screen. Unfortunately the person that deals with setting out the table plans and creating the bookings for the event doesn't have access to paypal to see who has bought a ticket. she only receives this information weekly. What I was wondering is if there is any extra code I can add to the code below that I can also send the details from the form to an email address as well as then onto paypal. This means when the person clicks the submit button the page will go the the payment screen pre-populated but also send a copy to the event manager.



    <form name="contact" onsubmit="validate(this, 'post', 'https://payflowlink.paypal.com ')" action="javascript:;" method="post" id="contact">
    <input type="hidden" value="garydonnelly" name="LOGIN">

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,628
    Thanks
    0
    Thanked 648 Times in 638 Posts
    You can't do it with JavaScript.

    The only way to do that is to have the form call a server side script that first sends the email and then passes the information to Paypal.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


  •  

    Posting Permissions

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