I tried using the following
// Start method 1
var grbData = $.ajax({
type : \"GET\",
url : \"http://grb.sonoma.edu:81/getg
If you want to use the first one, you should pass in a async:false.
var grbData = $.ajax({
type : "GET",
url : "http://grb.sonoma.edu:81/getgrbs.php",
async: false,
data : "start=0&perPage=3"}).responseText;
The $.ajax call is asychronous so the $.ajax call will give you that message you saw about data not being ready. This of course kind of defeats the purpose of AJAX since user interaction is blocked.
A better method might be:
var grbData = $.ajax({
type : "GET",
url : "http://grb.sonoma.edu:81/getgrbs.php",
dataType: 'html', // assuming your service returns HTML
success: function(data) {
$("#ajaxDiv").html(data);
}
});