Hey all. I have, what appears to be, a trivial problem. I have the following JavaScript:
$(function() { var r = GetResults(); for(var i = 0; i <
You could do this:
$(function() { PerformCall(); }); function PerformCall() { $.getJSON("/controller/method/", null, function(data) { for(var i = 0; i < data.length; i++) { // Do stuff with data } }); }