Showing posts with label Refresh div when insert database row in php. Show all posts
Showing posts with label Refresh div when insert database row in php. Show all posts

Thursday, August 12, 2010

PHP : Ajax : Refresh partially without refresh entire page

1. Show alert after 10 seconds with ajax setInterval function

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js"></script>
<script language="JavaScript">
setInterval( "alert('Hello World')", 10000 );
</script>


2. Update your contents after 5 seconds with ajax setInterval function

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js"></script>
<script language="JavaScript">
setInterval( "hello();", 5000 ); ///////// 5 seconds

$(function() {
hello = function(){
$('#dataDisplay').prepend("Hi This is auto refresh example<br><br>").fadeIn("slow");
}
});
</script>


3. Refresh div when insert database row


Ajax JQuery / PHP – Refresh Table Demo
Download Ajax JQuery / PHP – Refresh Table

Refer link:
http://www.w3cgallery.com/
http://www.brightcherry.co.uk