diff -r 0df8d2db55fb -r 82c3bb9a40c2 www/js/rec_edit.js --- a/www/js/rec_edit.js Mon Mar 04 11:40:33 2019 +0100 +++ b/www/js/rec_edit.js Mon Mar 04 14:20:48 2019 +0100 @@ -1503,11 +1503,14 @@ dataType: 'json', url: url, cache: false, + async: false, data: data, type: "POST", success: function (data, status, xhr) { + console.log("saveRecord() success"); }, error: function(jqXHR, textStatus, errorThrown) { + console.log("saveRecord() error"); } }); }; @@ -3671,7 +3674,7 @@ }); $("#Print").jqxButton({ template: "info", width: '80px', theme: theme }); - $("#Print").click(function () { + $("#Print").bind('click', function () { saveRecord(); // Open print in a new tab. var url="rec_print.php?record=" + my_record; @@ -3679,14 +3682,14 @@ }); $("#Export").jqxButton({ template: "info", width: '80px', theme: theme }); - $("#Export").click(function () { + $("#Export").bind('click', function () { saveRecord(); var url="rec_export.php?record=" + my_record + "&return=" + my_return + "&name=" + dataRecord.name; window.location.href = url; }); $("#Delete").jqxButton({ template: "danger", width: '80px', theme: theme }); - $("#Delete").click(function () { + $("#Delete").bind('click', function () { // Open a popup to confirm this action. $('#eventWindow').jqxWindow('open'); $("#delOk").click(function () { @@ -3708,12 +3711,12 @@ }); $("#Cancel").jqxButton({ template: "primary", width: '80px', theme: theme }); - $("#Cancel").click(function () { + $("#Cancel").bind('click', function () { window.location.href = my_return; }); $("#Save").jqxButton({ template: "success", width: '80px', theme: theme }); - $("#Save").click(function () { + $("#Save").bind('click', function () { saveRecord(); window.location.href = my_return; });