Stop Msgbox Error Messages

This is probably answered somewhere, but I couldn’t find it…
Is there a way to stop the program from showing Msgbox Error Messages. For example, every once in a while the Ajax call will fail and I’ll get an extremely complicated error message. I click ‘ok’ and program continues on without issue and next Ajax call works fine. So, I would like the program to continue on without the Msgbox. I did find ‘stopOnError’ and set that to false, but program still stops with Msgbox.
Rodney

Can you take a screenshot of one of these errors? It will help determine where it is coming from.

I’m a little slow in responding, but here is the error message I get…

Ajax Error: Status = function(){return f&&(c&&!b&&(h=f.length-1,g.push©),function d(b){n.each(b,function(b,c){n.isFunction©?a.unique&&j.has©||f.push©:c&&c.length&&“string”!==n.type©&&d©})}(arguments),c&&!b&&i()),this}

My program executes the Ajax call every 15 seconds. For the most part, it works fine. But, every once in a while, it stumbles and I get this message. Rodney

Can you provide a screenshot? I need to determine where this message is coming from.

Yes, I am really slow about responding to your question… But, I didn’t forget about it either… :slight_smile:

I found the issue with the Ajax error message popping up when the program started. And here’s what it was…

I had ‘sort of’ forgotten that the javascript file that nsbasic generates is one file: ‘code.js’ So, all the code for the different forms is in one code file. This means all the code gets scanned with the first form is display. Here’s the code that I had for the second form:

'Start the Ajax event...
 timeRef=SetInterval(nextAction,15000)

Function Form1_onshow()
    req=Ajax("boxx-getdata.php",done0)
    lblTimer.text = "Update Counter: " & i
End Function

So when the first form opened, the timer was started on the second form to call the Ajax function. When the associated Ajax call was made, it produced an error for the Ajax variables were not set yet. So, I moved the timer inside the event when the second form opened:


Function Form1_onshow()
    req=Ajax("boxx-getdata.php",done0)
    lblTimer.text = "Update Counter: " & i
    'Start the Ajax event...
    timeRef=SetInterval(nextAction,15000)
End Function

This took care of the odd-ball Ajax Error message. Perhaps remembering all the code.js gets scanned when the first form is opened will help someone else.
Rodney