Part of page refresh with time delay using MockAJAX – Facebook Developers

A Simple script that make our application works great. Yes, The following FBJS – FaceBook JavaScript will help you for part of page refresh in the facebook applications.


1) Helps to retrieve data from your server database without refreshing the page
2) It would be useful for cricket scores and other live datas.

Mock AJAX Script as follows,


function partRefresh(){

var ajax = new Ajax();

ajax.responseType = Ajax.FBML;

ajax.ondone = function(data) {


setTimeout(function() {partRefresh()},60000); // Making time delay


<div id=”partId”></div> // the output of filename.php is displayed here
partRefresh(); // Just calling the function on browser loads

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.