Welcome to WebmasterWorld Guest from 54.225.20.73

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)

New User

10+ Year Member

joined:Apr 17, 2003
posts:2
votes: 0


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)

Senior Member

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

joined:Mar 20, 2002
posts:3732
votes: 0


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)

Senior Member

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

joined:Mar 15, 2002
posts:6807
votes: 0


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

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members