Ajax |
[eluser]The Casual Bot[/eluser]
Hey this isn’t a CI problem but thought someone could point me in the right direction I’m make a small demand planning tool first I want to work out my safety stock level’s etc I have a CI page in which I feed in And numeric length of time i.e. 10 The time span IE. Months And the product code i.e. abc123 And it comes back with my safety stock level. a lot happens on this page and it takes around 19sec to complete Currently there’s around 5000 items I have to do this for So i made a second page which loads a list of stock codes and makes an Ajax request to get the safety stock level What I’m try to get working is to stop JavaScript from calling all at once I need to have it wait until the Ajax request is complete then move on im useing jquery .load for the ajax request Code: <div id="page">
[eluser]Georgi Budinov[/eluser]
You can use the callback for the load method http://api.jquery.com/load/ Code: $("#success").load("/not-here.php", function(response, status, xhr) { This way you can make a thread of ajax calls using a global js variable for example. |
Welcome Guest, Not a member yet? Register Sign In |