code_junkie

Problem with Events on AJAX-heavy page

Nov 12th, 2011
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. ready()
  2. {
  3. // count the number of groups that this user has, adding the ids to a list
  4. if( count < 50 )
  5. {
  6. runAjax();
  7. }
  8. else
  9. {
  10. // this calls the ajax request on groups of 50 ids
  11. // it pauses briefly after each request by using setTimeout to call the next
  12. runAjaxRecursively();
  13. }
  14. }
  15.  
  16. // run the HTTPRequest
  17. $.ajax({
  18. async: true,
  19. type: "POST",
  20. url: "emailcatcount.asp?idList="+idList,
  21. data: "idList="+idList,
  22. dataType: "html",
  23. success: function(html) { // blah blah blah }
  24. });
Add Comment
Please, Sign In to add comment