i tried for including external page in div in my home page but the problem 开发者_高级运维is that external page is developed in ajax means that if we click any link inside that external it doesn't change URL . My problem is that when i included that page in my code using code on link. http://www.javascriptkit.com/script/script2/ajaxpagefetcher.shtml
it doesn't show images and when i click any link it also doesn't work..
Please suggest some solution.
Thanks...
can use this JavaScript method to get content of any page and set it to div
function CallPageSync(url, data) {
var response;
$.ajax({
async: false,
url: url,
data: data, // parameters
timeout: 4000,
success: function(result) {
response = result;
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
response = "err--" + XMLHttpRequest.status + " -- " + XMLHttpRequest.statusText;
}
});
return response;
}
$('contentDiv').html(CallPageSync(url, ''))
This sounds like what iframes are for.
精彩评论