neilh Posted February 11, 2007 Share Posted February 11, 2007 Hello, I have a live stats box on my website which reloads every 6 seconds. Here's the code for the bit which does this, // Page Load Events function livestats() { MyAjaxRequest('onlinestats_ajax','/onlinestats.php'); setTimeout(livestats,6000); } function pageLoad() { livestats(); } the pageLoad() function is called in the body tag when the main page loads, and then the DIV which the ajax is loaded into shows the content. However if you have scrolled down the page after 6 seconds the page goes back up to the top. Now i can't work out why this is happening. If you want to see the Ajax JS file then here it is -> http://phptut.jungledog.co.uk/themes/default/ajax.js If you can help me sort this out it would be most appreciated! Thanks, Neil Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.