I'm trying to get the response text of www.google.com/movies using jQuery.
I have tried from $.load
to $.get
, $.ajax
, etc...
Anybody can tell me if this is possible?
Some of my failed attempts:
$(document).ajaxError(function () {
alert('ajax error');
});
$(document).load("http://www.google.com/movies?near=joinville,Santa+Catarina,Brazil", null, function (responseText) {
alert("Response:\n" + responseText);
});
$.getJSON("http://www.google.com/movies?near=joinville,Santa+Catarina,Brazil&callback=?",
function (responseText) {
if (responseText)
alert("Response:\n" + responseText);
else
alert("fail");
}
);
$.get("http://www.google.com/movies?near=joinville,Santa+Catarina,Brazil",
null,
function (responseText) {
if (responseText)
alert("Response:\n" + responseText);
else
alert("you fail again");
}
);
$.ajax({
cache: false,
url: "http://www.google.com/movies?near=joinville,Santa+Catarina,Brazil",
dataType: 'html',
success: function (responseText) {
if (responseText)
alert("Response:\n" + responseText);
else
alert("you fail again");
}
});