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