Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ParticipantInfo {
- constructor (public fname: string,
- public mname: string,
- public lname: string,
- public ssn: string,
- public sin: string,
- public tin: string,
- public addr1: string,
- public addr2: string,
- public addr3: string,
- public city: string,
- public state: string,
- public zip: string,
- public email: string,
- public phone: string,
- public local: string){}
- }
- var ParticipantInfo = (function () {
- function ParticipantInfo(fname, mname, lname, ssn, sin, tin, addr1, addr2, addr3, city, state, zip, email, phone, local) {
- this.fname = fname;
- this.mname = mname;
- this.lname = lname;
- this.ssn = ssn;
- this.sin = sin;
- this.tin = tin;
- this.addr1 = addr1;
- this.addr2 = addr2;
- this.addr3 = addr3;
- this.city = city;
- this.state = state;
- this.zip = zip;
- this.email = email;
- this.phone = phone;
- this.local = local;
- }
- return ParticipantInfo;
- }());
- $(document).ready(function(){
- $("#frmInquiryForm").submit(function(event){
- event.preventDefault();
- var formData = new ParticipantInfo($('[name="f1_fname"]').val(),
- $('[name="f1_mname"]').val(),
- $('[name="f1_lname"]').val(),
- $('[name="f1_ssn"]').val(),
- $('[name="f1_sin"]').val(),
- $('[name="f1_tin"]').val(),
- $('[name="f1_addr1"]').val(),
- $('[name="f1_addr2"]').val(),
- $('[name="f1_addr3"]').val(),
- $('[name="f1_city"]').val(),
- $('[name="f1_state"]').val(),
- $('[name="f1_zip"]').val(),
- $('[name="f1_email"]').val(),
- $('[name="f1_phone"]').val(),
- $('[name="f1_local"]').val());
- $.ajax({
- type: "POST",
- url:"processForm.php",
- data: JSON.stringify(formData),
- success: function(data){
- alert(data);
- window.location = 'confirmForm.php?message='+data;
- },
- error: function(xhr, ajaxOptions, thrownError){
- alert('status='+ajaxOptions);
- alert("XHR STATUS="+xhr.status+" "+ thrownError);
- }
- });
- })
- })
- <?php
- var_dump($_POST);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement