Gmail / Facebook Style Chat Application
Details Live Demo Download


Posted: Wednesday 17th of October 2012

Auto Load Contents and Refresh Div Every 10 Seconds via Ajax and jQuery.



There are times when you need to refresh some part of your web page in a specific interval of time.

For instance: Shared market updates, Users Online etc.. In cases like these, you may need to refresh a part of your web page without reloading the entire content on your page.

This tutorial teaches you how to load contents from an external file or page into your current page and refreshes these contents every 10 seconds with the help of PHP, Ajax and Jquery.

It loads contents from an external page into a div id attribute on your current page to keep a specified part of the current page up to date.
To see the screipt in action, please click on the demo button below and download if you like what you see.



Code:
<script language="javascript" src="jquery-1.2.6.min.js"></script>
<script type="text/javascript">
function Load_external_content()
{
      $('#external_page_content_displayer').load('external_content.php').hide().fadeIn(3000);
}
setInterval('Load_external_content()', 10000);
</script>

That's it guys...




Comments
0

 

Announcement x
Dear Users and Clients,

This is to inform you that we have recently updated our website generally.

If you experience any problem viewing any part of this website or if you notice that any of our scripts or tutorials are not functioning properly as should be, please click on the Contact Link at the top of this page to report the issue to us.

Our priority is to give you the best of service!


Thank You,
The Vasplus Team

Announcement