Subversion Repositories SmartDukaan

Rev

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

Rev 21942 Rev 21943
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
      console.log(formData);
786
      submitForm(formData);
787
      $.blockUI({ message: "<h5>Please wait while we upload data to our server</h5>" });
-
 
788
      
-
 
789
      jQuery.ajax({
-
 
790
          url: "register",
-
 
791
          type: 'POST',
-
 
792
          data: formData,
-
 
793
          async: false,
-
 
794
          success: function (data) {
-
 
795
              //$('#form')[0].reset();
-
 
796
        	  $.unblockUI();
-
 
797
          },
-
 
798
       error : function() {
-
 
799
    	   alert("OOPS!!!Failed to do changes.Try Again.");
-
 
800
    	   $.unblockUI();
-
 
801
       },
-
 
802
          cache: false,
-
 
803
          contentType: false,
-
 
804
          processData: false
-
 
805
      });
-
 
806
});
787
});
807
}
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
        async: false,
-
 
801
        success: function (data) {
-
 
802
            //$('#form')[0].reset();
-
 
803
      	  jQuery.unblockUI();
-
 
804
        },
-
 
805
     error : function() {
-
 
806
  	   alert("OOPS!!!Failed to do changes.Try Again.");
-
 
807
  	   jQuery.unblockUI();
-
 
808
     },
-
 
809
        cache: false,
-
 
810
        contentType: false,
-
 
811
        processData: false
-
 
812
    });
-
 
813
}
808
814