How to avoid RangeError maximum call stack size exceeded?
How to avoid RangeError maximum call stack size exceeded?
murciego.martin
Posts: 7Questions: 0Answers: 0
Enclosing certain statements that load or initialize the DataTable. I have for example a setTimeOut that refreshes it every 30 seconds with ajax.reload.
But it is a component that has to launch this error and it would be good to publish how to avoid these errors and get the best performance. Because it uses many resources to achieve desired functionalities
This discussion has been closed.
Replies
That error is specific to your setup. Using
setTimeout
withajax.reload()
in this example works without error:http://live.datatables.net/gekepesa/1/edit
Sounds like you have a continuous loop somewhere. Without seeing your code its hard to say what the problem is. Can you post a link to your page or update the example to replicate your issue?
Just to make sure you have the value for your setTimeout function as
30000
correct?Kevin
Actually what I meant to say setTimeInterval()
Maybe I need to control with a flag when refreshing the dataTables every so often in case there is an operation being performed that does not call ajax.reload at that moment.
I found in stackoverflow that a function without parenthesis must be passed to avoid recursion within the call to setInterval (). It is something that I run to periodically refresh the dataTables but if there were any pending operation or CRUD type it would be necessary to use a state or flag variable,