homepage Welcome to WebmasterWorld Guest from 54.167.144.4
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Javascript - history.go and refresh
Javascript - history.go and refresh
banuelosa




msg:1471051
 6:44 pm on Apr 17, 2003 (gmt 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

 

korkus2000




msg:1471052
 6:48 pm on Apr 17, 2003 (gmt 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.

DrDoc




msg:1471053
 7:38 pm on Apr 17, 2003 (gmt 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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved