Subversion Repositories SmartDukaan

Rev

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

Rev 21944 Rev 21950
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',
786
      submitForm(formData);
790
          data: 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
});
805
});
788
}
806
}
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
    $('#pleaseWaitDialog').modal('show');
-
 
796
    
-
 
797
    jQuery.ajax({
-
 
798
        url: "register",
-
 
799
        type: 'POST',
-
 
800
        data: formData,
-
 
801
        async: false,
-
 
802
        success: function (data) {
-
 
803
            //$('#form')[0].reset();
-
 
804
      	  //jQuery.unblockUI();
-
 
805
        	$('#pleaseWaitDialog').modal('hide');
-
 
806
        },
-
 
807
     error : function() {
-
 
808
  	   alert("OOPS!!!Failed to do changes.Try Again.");
-
 
809
  	 $('#pleaseWaitDialog').modal('hide');
-
 
810
     },
-
 
811
        cache: false,
-
 
812
        contentType: false,
-
 
813
        processData: false
-
 
814
    });
-
 
815
}
-
 
816
807