I'm trying to return some information from an .ajax function but I'm having trouble extracting the data I need from the requested page .ajax function looks like this:
$.ajax({
type: 'get',
async: false,
url: "www.site.com",
success: function(Data) {
return Result = $(Data).filter('#ReturnedInfo');
},
error: function(Data) {
return Result = "no";
}
});
$('#ShowReturned').append("Start"+Result+"end");
Yet on the page all that is being appended is Start[object Object]end or null, depending on the method I choose. (returning Data itself successfully appends the entire page)
I've had a look at some other questions on the site that seem to be having similar problems but none of the solutions appear to work.
Any help is greatly appreciated.