Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82615

error event not thrown when ready state 0

$
0
0

Hello,
I'm using datatables for server side processing and I would like following scenario to happen:

  • user changes page but he has no Internet connectivity so the ajax request remains in readystate 0 (but don't hang forever, I see that jQuery throws an error in the console immediatly)
  • I can listen to this error and show a message to the user

I saw in the docs about this event https://datatables.net/reference/event/error and works like a charm when the connection ends with an error (for example 500 from the server), but it is not raised when the request is stalled

I see that this event is fired https://datatables.net/reference/event/xhr but I would like to know if there is a better way than intercepting every single request and why error event is not raised


Viewing all articles
Browse latest Browse all 82615

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>