Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

calling previous page whout refreshing it.  RSS feed

 
kiran babu ssr babu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A page( not a popup window) is displayed on click of a button, and on the displayed screen, on click of a button, previous screen should be displayed without refreshing it.I used history.back()(in the java script) but its not working,its saying page expired.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to Javaranch!

You used history.back() with a value of -1? like, history.back(-1).
[ May 04, 2005: Message edited by: Adeel Ansari ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will only be able to do that if the previous page is still in the browser's cache. Since you can't control how the user's configure their browsers, there is no guarantee that the cached page will be there.

If it's that important, you could keep your own history on the server and rebuild the previous page. This could be a lot of work if the previous page had forms with a lot of user input.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This simply means you need the data back from the server to the client. Without refreshing, no guarantee. Now you know, why.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congrats.
Well, although you have solved it by passing -1 to your history.back() method.
But I suggest you to consider Ben's advice.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!