www/js/rec_edit.js

changeset 777
daf55c944fb0
parent 775
3f2f6e483a4e
child 804
ac5c3e97fcf1
--- a/www/js/rec_edit.js	Thu Sep 09 15:40:06 2021 +0200
+++ b/www/js/rec_edit.js	Sun Sep 12 20:35:04 2021 +0200
@@ -2735,8 +2735,13 @@
    async: false,
    data: data,
    type: 'POST',
-   success: function(data, status, xhr) {
-    console.log('saveRecord(' + goback + ') success');
+   success: function(data) {
+    if (data.error) {
+     console.log('saveRecord(' + goback + ') error ' + data.msg);
+     alert('SQL fout: ' + data.msg);
+    } else {
+     console.log('saveRecord(' + goback + ') success');
+    }
     if (goback)
      window.location.href = my_return;
     else

mercurial