Loading...
 
Gmail / Facebook Style Chat Application


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



Views Today: 0
Total Views: 1477

Comments
0
OUR OBJECTIVE

Our objective is to reach a place where our services will be highly regarded by businesses from various industrial domains for building their innovative busines solutions with our cutting-edge technological expertise, interactive designs and uncompromised quality.

OUR MISSION

We aspire to help businesses ranging from startups to enterprises, who reach out to us with their requirements, in achieving great lengths, expanding their reach, upscaling their products, and generate a large user-base with our outstanding and cost-effective services.

Copyright © 2011 - 2024 | All Rights Reserved