Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Javascript
browser doesn't response, long calculations
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Hollow Quincy, post: 5008417"] I can't put calculations in server side (because trick is to put it in client side). Now I do something like that: $(document).ready(function() { setTimeout( f(), 0); }); var counter=0; function f(){ //.... for (j = 0; j < 100; j++) { //my heavy calculations } if (counter < 50) { counter++; setTimeout( f(), 100); //setTimeout with 0 or 100 or 1000 hang browser }} After (about) 10 calling of function f() browser work very slow and is not responding and hang. I would like to do the calculations in background.. Of course I will do progressbar and animation, but I can't hang browser.. What else can I do ? Thank you very much for help [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Javascript
browser doesn't response, long calculations
Top