Someone Posted January 2, 2013 Share Posted January 2, 2013 (edited) When using Ajax::UpdateTimer the flood control gets activated. EDIT: I will do more testing, to see if something I do wrong to cause it Edit 2, never mind think I might have caused some bad redirections. although, I am wondering, is there a way to stop Ajax refresh after its started? Edited January 2, 2013 by Someone Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted January 4, 2013 Share Posted January 4, 2013 What is exactly what you are after? You don't want to refresh forever ? Sorry I'm somewhat lost here. Quote Link to comment Share on other sites More sharing options...
Someone Posted January 4, 2013 Author Share Posted January 4, 2013 Say you have a oage where you are waiting for something to happen. At the time I was making a traveling script, while walking things could happen, like getting mugged. It was based on time, but when the time is up and player have arrived to his/her destination, I would like the page to stop making ajax calls. a handy thing can also be to allow javascript to be passed back as a result in an ajax call. So you can remove/disable buttons and other things, depending on the result. Another small thin I added to ajax.php before the output header('Content-type: application/json'); Some browsers are sensitive to this, think it was IE7-8 Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted January 4, 2013 Share Posted January 4, 2013 Ok so you want some sort of "stop" refresh sent by the server. I will check how to implement it. For the content type, I never had any issues myself, but doesn't hurt to add it ;) Quote Link to comment Share on other sites More sharing options...
Someone Posted January 4, 2013 Author Share Posted January 4, 2013 Yup I want it stopped, no rush though, I went with another system Good article about it here http://javascript.info/tutorial/settimeout-setinterval It also shows what happened to me, if one call takes to long, it fires off and keeps making new requests, very rapidly. content type, I recall it because it cost me many hours and much hair when I first learned jQuery :) And a bonus is that its helpful when using Firebug. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.