Hello everyone
i'm developing facebook app but i want when user reach at the end of the page the content auto load from database. The only problem is that how i can check that user's reach at the end of the page with in iframe.

I have used auto load content in websites but i only want to know how we can acheive this within iframe because there is no scroll bar in facbook app.

Regards
Rizwan

maybe getPageInfo function could help you?

----------------------------------
FB.Canvas.getPageInfo

Returns a Javascript object containing information about your app's canvas page. You need to provide a callback with the API, where we fetch the new value and return it.

As a Canvas app runs within an iframe it does not have access to window.innerHeight and window.innerWidth. This method exists to provide access to the client (browser) dimensions as well as the current scroll position and offset coordinates.

Example:

FB.Canvas.getPageInfo(
    function(info) {
        alert('Width: ' + info.clientWidth + ' Height: ' + info.clientHeight);
    }
);

Returns:

clientHeight (Integer) The height of the viewport in pixels

clientWidth (Integer) The width of the viewport in pixels

offsetLeft (Integer) The number of pixels between the left edge of the viewport and the left edge of your app's iframe

offsetTop (Integer) The number of pixels between the top edge of the viewport and the top edge of your app's iframe

scrollLeft (Integer) The number of pixels between the left edge of your iframe and the left edge of your iframe's viewport

scrollTop (Integer) The number of pixels between the top edge of your iframe and the top edge of your iframe's viewport

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.