Discussions

 View Only
  • 1.  javascript is not finishing

    Posted 08-17-2018 14:03
    I have some complicated javascript that normally works fine, but lately,  the code is not finishing and I am not seeing any errors.  At least, the users are not seeing any.  I am wondering if there could be timeouts in javascript, or timeouts within QB?  

    Any thoughts on how I can put in some code that might help point me to where the issue is?  Since it is sporadic, I can't reproduce it.
    thanks in advance,
    Dean


  • 2.  RE: javascript is not finishing

    Posted 08-17-2018 14:25
    Post the code. Add console logging statements to debug.

    If I had to guess I would say that there is probably something you are doing with AJAX requests which are not sequenced properly and when network response time changes you code is not responding to events/promises in the assumed order.


  • 3.  RE: javascript is not finishing

    Posted 08-17-2018 14:48
    Thanks Dan, 

    here is the first script that is called from the IOL.
    https://pastebin.com/5L8wcZZ3

    here is the include:

    https://pastebin.com/0LKffavH

    I think you are probably right about the order of the  AJAX calls.


  • 4.  RE: javascript is not finishing

    Posted 08-17-2018 15:08
    Sorry but that's over a thousand lines of code so I am not even going to look at it. I have a half dozen demos that are either near complete or half way done that I haven't gotten to yet ...

    FWIW, I don't know if you are nesting your AJAX calls or chaining them together through then() continuations but there is a bug in the version of jQuery QuickBase is using (1.7.1) that shows up when you create a chain of two or more then() continuations. This may or may not be the problem but such a large piece of code should be broken up and the chain of promises very well understood.

    Also, I saw an indication you were using the Save and Scooby Doo technique. There may be an issue with specific browsers (it should work in Chrome). I recall I added a fix to the technique but would have to research it myself as it has been a while.

    If you need individual help you can contact me off world using the information in my profile:

    https://getsatisfaction.com/people/dandiebolt