View Full Version : referring history automatically ???

07-24-2010, 07:49 AM

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....

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


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

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

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum