I really need help on this,I know nothing about ajax.. and I really need this to include in my page
this is the original code : -
<html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<meta name="generator" content="Andy Moore: http://locationdetection.mobi/">
<title>TEST1</title>
</head>
<body>
<div id="geo" class="geolocation_data"></div>
<?php
include 'geojavascript.php';
?>
</body>
</html>
I would like to add ajax auto refresh.. to refresh the div link which is something like this : -
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/
libs/jquery/1.3.0/jquery.min.js"></script>
<script>
var auto_refresh = setInterval(
function()
{
$('#geo').fadeOut('slow').load('geojavascript.php').fadeIn("slow");
}, 20000);
</script>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<meta name="generator" content="Andy Moore: http://locationdetection.mobi/">
<title>Locator</title>
</head>
<body>
<div id="geo" class="geolocation_data"></div>
<?php
include 'geojavascript.php';
?>
</body>
</html>
But, there is something wrong here... instead of refreshing the div.. it refresh html page only.. not the div data.. anyone.. please help me on this ?
thanks in advance guys...