Changeset 3276154
- Timestamp:
- 04/17/2025 06:59:34 PM (12 months ago)
- File:
-
- 1 edited
-
web-stat/trunk/js/wts_script.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
web-stat/trunk/js/wts_script.js
r3275925 r3276154 95 95 }) 96 96 .then(function(response) { 97 return response.json(); 98 }) 99 .then(function(response) { 100 if (! response.success) { 101 send_debug_message('Error sending data to PHP', response.data); 102 } 103 }) 104 .catch(function(error) { 105 send_debug_message('AJAX exception', error); 106 }); 97 return response.text(); // Get raw response 98 }) 99 .then(function(text) { 100 try { 101 const json = JSON.parse(text); 102 if (!json.success) { 103 send_debug_message('Error sending data to PHP', json.data); 104 } 105 } catch (e) { 106 send_debug_message('AJAX response is not valid JSON', text); 107 } 108 }); 107 109 } 108 110
Note: See TracChangeset
for help on using the changeset viewer.