This exact same code works in another app (outside of the app I'm working on). It's coded as a non-MVC app.
The "making saveRecord ajax call" shows up in the log.
The "ajax request success" does not show up in the log.
The Ajax Failure message window shows up.
Here is the error in Chrome Tools:
line 655 is the save button in a window making the function call to saveRecord(outMode).
line 400 is the ajax request singlton.
Here is my saveRecord function that makes the ajax call. This is executed from a save button in a window.
The "making saveRecord ajax call" shows up in the log.
The "ajax request success" does not show up in the log.
The Ajax Failure message window shows up.
Here is the error in Chrome Tools:
Code:
POST http://mysystem:6031/valence/vvcall.pgm 500 (Internal Server Error) ext-all.js:15 Ext.define.request ext-all.js:15 saveRecord vvcall.pgm:400 Ext.create.dockedItems.items.handler vvcall.pgm:655 Ext.define.fireHandler ext-all.js:15 Ext.define.onClick ext-all.js:15 (anonymous function) c
line 400 is the ajax request singlton.
Here is my saveRecord function that makes the ajax call. This is executed from a save button in a window.
Code:
function saveRecord(inMode) { continueValidation = true; // continue validation if field depencies validated if (continueValidation) { console.log('making saveRecord ajax call'); Ext.Ajax.request({ url: 'vvcall.pgm', params: { pgm: 'MYPGM', action: 'saveRecord', inMode: inMode }, success: function(response) { console.log('ajax request success'); var data = Ext.decode(response.responseText); if (data.SUCCESS == '1') { Valence.util.msg({ title: 'Saved', msg: data.MSG, el: myGrid.el, slideFrom: 'r' }); // hide form window and reload grid myWindow.hide(); jmyDataStore.loadPage(1); } else { console.log('the bad field = '+data.FLD); try { if (data.FLD !== ' ') { jprrsnFormPanel.down('#' + data.FLD).markInvalid(data.MSG); } } catch(e){ Ext.Msg.alert('Ajax Response Unmonitored','An unmonitored error occured when attempting to save record'); } } }, failure: function() { Ext.Msg.alert('Ajax Failure', 'Received a failure response from the server when attempting to save record.'); } }); } }
Comment