views:

42

answers:

2

Hi 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...

A: 

This sounds like what iframes are for.

Erik Vold
right its like iframe but i want the same functionality in div
rajesh
+1  A: 

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, '')) 
Space Cracker