SitePoint Sponsor |
|
User Tag List
Results 1 to 6 of 6
Thread: history.back
-
Jul 22, 2008, 23:40 #1
- Join Date
- Jun 2008
- Posts
- 65
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
history.back
Hi,
I have used window.history.back() and it successfully redirects to page I wanted but that page is refreshed. I need to regain the original values posted in that page. How can I accomplish that ?
Thanks
Sampada
-
Jul 22, 2008, 23:53 #2
Try Following:
window.history.back(-1)Best Joomla Web Design and Development Agency :--:
PSD to Joomla :--: Award Winning Web Design Company
-
Jul 23, 2008, 00:01 #3
- Join Date
- Jun 2008
- Posts
- 65
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
yep, i had already tried that. But the page is still refreshed
-
Jul 23, 2008, 00:09 #4
That's strange as I am using both of them:
<a href="javascript: window.history.back(-1)">Back</a>
<a href="javascript: window.history.back()">Back</a>
Can I see your URL Please?Best Joomla Web Design and Development Agency :--:
PSD to Joomla :--: Award Winning Web Design Company
-
Jul 23, 2008, 00:25 #5
- Join Date
- Jun 2008
- Posts
- 65
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
may be the information is not stored in cookie.
I m using rapyd framework
Back url is :http://localhost/xxxx/rapyd/sponsorform/commitment/1
The code is like:
$action = "javascript:window.history.back(-1)";
$form->button("btn_back", "Go Back", $action, "BL");
-
Jul 23, 2008, 01:59 #6
- Join Date
- Sep 2005
- Location
- Sydney, NSW, Australia
- Posts
- 16,875
- Mentioned
- 25 Post(s)
- Tagged
- 1 Thread(s)
You don't need -1 with back since back always goes back exactly one page. To go back two pages you'd use go(-2) instead.
Whether a browser retains values for past pages or not depends on the browser. If you want all browsers to save the data then save it in a cookie while you are on that page the first time.Stephen J Chapman
javascriptexample.net, Book Reviews, follow me on Twitter
HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
<input name="html5" type="text" required pattern="^$">
Bookmarks