hi guys, this is the second thing ive attempted using jquery/ajax, so first, if im in the wrong place can someone please move this, and secondly, i have a script to auto refresh a div, its not coming up in the right place, plus its not loading on page load it waits a while before loading up. i will post the code below.

Code:
<script type="text/javascript">
<!--

function updateClock ( )
{
  var currentTime = new Date ( );

  var currentHours = currentTime.getHours ( );
  var currentMinutes = currentTime.getMinutes ( );
  var currentSeconds = currentTime.getSeconds ( );

  // Pad the minutes and seconds with leading zeros, if required
  currentMinutes = ( currentMinutes < 10 ? "0" : "" ) + currentMinutes;
  currentSeconds = ( currentSeconds < 10 ? "0" : "" ) + currentSeconds;

  // Choose either "AM" or "PM" as appropriate
  var timeOfDay = ( currentHours < 12 ) ? "AM" : "PM";

  // Convert the hours component to 12-hour format if needed
  currentHours = ( currentHours > 12 ) ? currentHours - 12 : currentHours;

  // Convert an hours component of "0" to "12"
  currentHours = ( currentHours == 0 ) ? 12 : currentHours;

  // Compose the string for display
  var currentTimeString = currentHours + ":" + currentMinutes + ":" + currentSeconds + " " + timeOfDay;

  // Update the time display
  document.getElementById("clock").firstChild.nodeValue = currentTimeString;
}

// -->
</script>
<script src="http://ajax.googleapis.com/ajax/
libs/jquery/1.3.0/jquery.min.js"></script>
 <script>
function LOAD()
{
var auto_refresh = setInterval(
$('#loaddiv').load('inc-response.php');
}, 20000);
</script>




<body onLoad="updateClock(); setInterval('updateClock()', 1000 )" onLoad="LOAD();" >
the clock works fine loads on page load, however the auto refresh of the dive called loaddiv isnt loading on page load, the div is collecting a php file that it auto refreshes to see if the user has any new messages.

the other problem is that the div is coming above the country that the user is in when in the script its wrote in below it:

Code:
<div class="cat">
<img style="width: 100%;" src="game/site/site/table_top.gif">
<table class="cat" border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td colspan="2" align="center"><?php echo date('l'); ?><br /><span id="clock">&nbsp;</span>
</td></tr><br /><tr><td colspan="2" align="center"><div id="1">
<?php echo "<a href='trainstation.php'>$fetchlocation->country</a>"; ?></div></td></tr>
<tr>
<div id="loaddiv">
</div>
</tr>
</tbody></table></div>
<br><img style="width: 100%;" src="game/site/site/table_bottom.gif"><br>
as im new to this, please help me as much as, so i can get a better understanding of it.

Thanks.