Subversion Repositories SmartDukaan

Rev

Rev 21950 | Rev 21953 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 21950 Rev 21951
Line 781... Line 781...
781
      if(!isChecked){
781
      if(!isChecked){
782
          alert('Please select the Status of shop');
782
          alert('Please select the Status of shop');
783
           return false;
783
           return false;
784
     }
784
     }
785
      formData = new FormData($(this)[0]);
785
      formData = new FormData($(this)[0]);
786
      $('#ajax-spinner').show();
-
 
787
      jQuery.ajax({
-
 
788
          url: "register",
-
 
789
          type: 'POST',
-
 
790
          data: formData,
786
      submitForm(formData);
791
          async: false,
-
 
792
          success: function (data) {
-
 
793
            $('#ajax-spinner').hide();
-
 
794
              alert("ThankYou for the registration.Out team will contact you soon.");
-
 
795
              $('#form')[0].reset();
-
 
796
          },
-
 
797
       error : function() {
-
 
798
    	   $('#ajax-spinner').hide();
-
 
799
    	   alert("OOPS!!!Failed to do changes.Try Again.");
-
 
800
       },
-
 
801
          cache: false,
-
 
802
          contentType: false,
-
 
803
          processData: false
-
 
804
      });
787
      });
-
 
788
    }
-
 
789
 
-
 
790
 
-
 
791
 
-
 
792
function submitForm(formData){
-
 
793
    console.log(formData);
-
 
794
    jQuery.blockUI({ message: "<h5>Please wait while we upload data to our server</h5>" });
-
 
795
    
-
 
796
    jQuery.ajax({
-
 
797
        url: "register",
-
 
798
        type: 'POST',
-
 
799
        data: formData,
-
 
800
        success: function (data) {
-
 
801
            //$('#form')[0].reset();
-
 
802
      	  jQuery.unblockUI();
-
 
803
        },
-
 
804
     error : function() {
-
 
805
  	   alert("OOPS!!!Failed to do changes.Try Again.");
-
 
806
  	   jQuery.unblockUI();
-
 
807
     },
-
 
808
        cache: false,
-
 
809
        contentType: false,
-
 
810
        processData: false
805
});
811
    });
806
}
812
}
807
813