Passing values through multiple html pages

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • HawkMan24
    New Member
    • Apr 2010
    • 12

    #1

    Passing values through multiple html pages

    I have an html page that allows folks to register for an uncoming event, once they fill in the information and hit a Calculate button to figure up their total amount to pay to attend the event, they hit a Pay Now button and it takes them to PayPal to make payment, I want to email all their information on the prior page only after they make Payment. When it takes them to PayPal, the button I created has 2 pages it will take them to dependent on their response once in there. It will take them to a Thank You page for making payment or it will take them to a page that say they didn't make payment and please come back and register later. If they go to the made payment page, I have an asp sciprt that will email all the information from the original page, but I don't know how to get all that information from the original page through the PayPal page, then to the Thank you page and to the asp script. If they end up going to the didn't make payment page, it will just direct them back to the home page for the original site. I have all this working except passing the information all the way to the email script. Can this be done and more importantly, how? I currently have this java script function in my Thank You page to try and pull in the information, but it isn't working. There are many more fields, but I am just trying to pull the first name and last name and it go through to the email to see that it works.

    Code:
    <script type="text/javascript">
    function GetParam(name)
    {
      var start=location.search.indexOf("?"+name+"=");
      if (start<0) start=location.search.indexOf("&"+name+"=");
      if (start<0) return '';
      start += name.length+2;
      var end=location.search.indexOf("&",start)-1;
      if (end<0) end=location.search.length;
      var result='';
      for(var i=start;i<=end;i++) {
        var c=location.search.charAt(i);
        result=result+(c=='+'?' ':c);
      }
      return unescape(result);
    }
    
    GetParam('FirstName')
    GetParam('LastName')
    </script>
    Thanks in advance!
    Last edited by Dormilich; Apr 12 '10, 06:19 PM. Reason: Please use [code] tags when posting code
  • rahuljaiswal1987
    New Member
    • Apr 2010
    • 23

    #2
    When a user clicks Pay Now jus save all details in a servelet and once payment is done send a mail with these details which are still persist in servelet. Hope It'll help u.

    Comment

    • HawkMan24
      New Member
      • Apr 2010
      • 12

      #3
      Originally posted by rahuljaiswal198 7
      When a user clicks Pay Now jus save all details in a servelet and once payment is done send a mail with these details which are still persist in servelet. Hope It'll help u.
      I don't know anything about saving details in a servelet but I am willing to learn. I learn best by seeing examples. Can you provide me a link to an example that shows how to save the information using a servelet and exactly where it goes in the html page and also one that shows how to access that information so I can email it later?

      Comment

      Working...