I need to auto refresh the content of a page once a form has been submitted. The content is a search for hashtags and it needs it to update every x seconds. The bit I am struggling with is, is my form submits to itself so everything is handled on the same page. So I need to preserve the users search string when the content is refreshed so it displays the results and any new ones that been found.
Pretty much the same in principle as http://gigatweeter.com/
This is the code I have been using.
<script type="text/javascript">
var auto_refresh = setInterval(
function ()
{
$('#load_page').load('twitter.php').fadeIn("slow");
}, 10000); // will auto refresh every 10 seconds
</script>
I cant find any support or threads into how to do this if the the page submits to itself so any help would be appreciated.
Could I call the php at the top of the page to start again perhaps?