To enumerate the Ajax in Jquery and implementation of the prototype.
Jquery:

<Script language="javascript" >
$(function () {
var box={},
var remoteUrl='index.php'
box. The interval=5 * 60 * 1000;//5 minutes.
box showBoxInfo=function () {
jQuery. Get (remoteUrl, function (data) {
var msg_box=$(' #msg_box);
msg_box. InnerHTML=data;
}
});
}
box. Run=function () {
this. ShowBoxInfo ();
setInterval (enclosing showBoxInfo, enclosing the interval);
},
box. The run ();
})
</script>

the prototype:

<Script language="javascript" >
var box={};
in the box. The interval=5 * 60 * 1000;//
5 minutes box. ShowBoxInfo=function () {
var pars="";
var remoteUrl='index.php'; .
var myAjax=new Ajax Request (
remoteUrl,
{
method: 'get',
the parameters: pars,
the onComplete: box. ShowResponse
});
};
box. ShowResponse=function (data) {
var msg_box=$(" msg_box ");
msg_box. InnerHTML=data. The responseText;
};
box. Run=function () {
this. ShowBoxInfo ();
setInterval (enclosing showBoxInfo, enclosing the interval);
};
in the box. The run ();
</script>

the actual prototype cannot refresh after introducing the setInterval function, is this why?
turned out to be a prototype for the same URL caching mechanism, should this not refresh the page, especially after the user use F5 or click on the "refresh", will appear the Ajax response area blank bug, so you must make the prototype doesn't refresh.
in the prototype URL add random number
the original: var remoteUrl='index.php';
the revised: var remoteUrl='index.php? Rand='+ Math. The random ();
using the GET method to create a has nothing to do with page shows the parameters of the can.


This concludes the body part