Rev 23032 | Go to most recent revision | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed
$().ready(function() {$("form#update-retailer-details-form input").each(function(){$(this).attr('autocomplete', 'off');});});$().ready(function() {// validate the comment form when it is submitted//var shopDetailsSize = $("#shopDetailsSize").attr("size");$('#update-retailer-details-form').validate({submitHandler: function (form, event) {event.preventDefault();if(validateRetailerDetails()){alert("Please fix errors");return false;}var json = retailerDetailsJson();console.log("retailerJson = " + json);if(confirm("Are you sure you want to update Retailer Details!") == true){$.ajax({type: "PUT",url: "retailerDetails",data: json,contentType:'application/json',async: false,success: function (data) {$('#main-content').html(data);},cache: false,processData: false});return false; // required to block normal submit since you used ajax}}});});