...

View Full Version : referring history automatically ???



hansan
07-24-2010, 08:49 AM
Hi,

I have a form in my site.when the form is submit successfully it's go to another page, which shows "submission is success".


and that page has a link to go back to a page which is viewing previously(before to form)



this is the code for it

<a href="javascript:history.go(-2)">Go back to previous</a>


I want to know, how to go to previous page by automatically??? this should be happen after 10 seconds!

please help me....

wildreason
07-24-2010, 11:22 AM
You can have the PHP that shows "submission is success" also output the following. 10000 is 10 seconds in ms:



<?php

echo '
<script type="text/javascript">
setTimeout("history.go(-2)", 10000);
</script>
';
?>

hansan
07-24-2010, 11:42 AM
WOW !
it's working! thanx wildreason.....:)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum