function btnParsingOnClick() { $.ajax({ type: "GET", url: url + "?action=startparsing&r=" + Math.random(), dataType: "json", data: null, async: true, beforeSend: function () { //$("#btnStartParsing").prop("value", "Processing, please wait...,Do not click again or close page"); $("#btnStartParsing").val("Processing, please wait...,Do not refresh or close page"); $("#btnStartParsing").prop("disabled", true); }, success: function (json) { $("#parsingResult").text(json.msg); loadShareFolderXml(); }, complete: function () { $("#btnStartParsing").val("Start Parsing"); loadShareFolderXml(); }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(textStatus); } }); return false; }