Guest User

Untitled

a guest
May 5th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1.  
  2. This is what I had in mind. I am using Updater at the moment so I had to rewrite this code for the example
  3.  
  4. for( count=0; count < reports.length; count++){
  5. url="reports/"+reports[count]+".php";
  6. // load our reports. when each one is loaded we load the optional
  7. // javascript file for that report.
  8. new Ajax.Request( url, {
  9. parameters: { day: day, month: month, year: year},
  10. onCreate: function(transport){
  11. showLoading(reports[count])
  12. },
  13. onSuccess:function(transport){
  14. $(reports[count].update(transport.responseText);
  15. }
  16. });
  17. }
  18.  
  19.  
  20. reports.each(function(e){
  21.  
  22. url = "reports/" + e + ".php"
  23.  
  24. new Ajax.Request(url, {
  25.  
  26. parameters: {....},
  27. onSuccess: function(transport)
  28. {
  29.  
  30. $(e).update(transport.responseText)
  31.  
  32. }.bind(e)
  33.  
  34. })
  35.  
  36. })
Add Comment
Please, Sign In to add comment