Welcome to WebmasterWorld Guest from 54.145.144.101

Forum Moderators: open

Message Too Old, No Replies

Javascript - history.go and refresh

Javascript - history.go and refresh

   
6:44 pm on Apr 17, 2003 (gmt 0)

10+ Year Member



6:21 pm on Apr 17, 2003 (utc 0)
Hi
I want to redirect the user ONE step back in itīs history. Also, I want the page to refresh when the user gets there.

The scenario is:

The user is deleting records in a database. They are alerted that the recorded has been deleted, after they click on the button with the ALERT, I wan tthem to go back one page and that same page be refreshed.

Current Javascript Code:
<script language="javascript">
<!--
alert("Record Deleted.")
history.go(-1)
//-->
</script>
<input type=button name=button1 value="Back" onClick="javascript:window.close();">

Thank Anthony

6:48 pm on Apr 17, 2003 (gmt 0)

WebmasterWorld Senior Member korkus2000 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



What server side language are you using? The history.go(-1) should work to push them back. It looks like you are closing a window. If you are trying to target the opener window to move back you need to use opener.history.go(-1). To refresh the page you may want to prevent caching server-side.
7:38 pm on Apr 17, 2003 (gmt 0)

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Hmm... "go back one page and refresh"

Why not let them go forward to the previous page? Less problems with cached pages :)

location.replace if using JavaScript

 

Featured Threads

Hot Threads This Week

Hot Threads This Month