Advertisement
Guest User

Untitled

a guest
Jan 19th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.75 KB | None | 0 0
  1. class ParticipantInfo {
  2.  
  3. constructor (public fname: string,
  4. public mname: string,
  5. public lname: string,
  6. public ssn: string,
  7. public sin: string,
  8. public tin: string,
  9. public addr1: string,
  10. public addr2: string,
  11. public addr3: string,
  12. public city: string,
  13. public state: string,
  14. public zip: string,
  15. public email: string,
  16. public phone: string,
  17. public local: string){}
  18. }
  19.  
  20. var ParticipantInfo = (function () {
  21. function ParticipantInfo(fname, mname, lname, ssn, sin, tin, addr1, addr2, addr3, city, state, zip, email, phone, local) {
  22. this.fname = fname;
  23. this.mname = mname;
  24. this.lname = lname;
  25. this.ssn = ssn;
  26. this.sin = sin;
  27. this.tin = tin;
  28. this.addr1 = addr1;
  29. this.addr2 = addr2;
  30. this.addr3 = addr3;
  31. this.city = city;
  32. this.state = state;
  33. this.zip = zip;
  34. this.email = email;
  35. this.phone = phone;
  36. this.local = local;
  37. }
  38. return ParticipantInfo;
  39. }());
  40.  
  41. $(document).ready(function(){
  42. $("#frmInquiryForm").submit(function(event){
  43.  
  44. event.preventDefault();
  45.  
  46. var formData = new ParticipantInfo($('[name="f1_fname"]').val(),
  47. $('[name="f1_mname"]').val(),
  48. $('[name="f1_lname"]').val(),
  49. $('[name="f1_ssn"]').val(),
  50. $('[name="f1_sin"]').val(),
  51. $('[name="f1_tin"]').val(),
  52. $('[name="f1_addr1"]').val(),
  53. $('[name="f1_addr2"]').val(),
  54. $('[name="f1_addr3"]').val(),
  55. $('[name="f1_city"]').val(),
  56. $('[name="f1_state"]').val(),
  57. $('[name="f1_zip"]').val(),
  58. $('[name="f1_email"]').val(),
  59. $('[name="f1_phone"]').val(),
  60. $('[name="f1_local"]').val());
  61. $.ajax({
  62. type: "POST",
  63. url:"processForm.php",
  64. data: JSON.stringify(formData),
  65. success: function(data){
  66. alert(data);
  67. window.location = 'confirmForm.php?message='+data;
  68. },
  69. error: function(xhr, ajaxOptions, thrownError){
  70. alert('status='+ajaxOptions);
  71. alert("XHR STATUS="+xhr.status+" "+ thrownError);
  72.  
  73. }
  74.  
  75. });
  76.  
  77. })
  78. })
  79.  
  80. <?php
  81. var_dump($_POST);
  82. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement