Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Auto Save Functionality on browser "X" close button

 
Sudha Ghatty
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a following requirement that the data on a jsp page needs to be auto saved when the user clicks on the X button on the browser.

Can you please suggest how to implement this?

Thanks,
Sudha.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13077
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assuming you mean saved on the server side, there is only one way to guarantee this, save the state after every request/response cycle.

Bill
 
Markas Korotkovas
Greenhorn
Posts: 21
Eclipse IDE Java Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
or do a lot of ajax style async updates like Google's Gmail or Documents. You can also try to capture the close event of the window through javascripts but that will not ensure 100% reliability as there are events that will close the window but not trigger the event.
 
Sunny Bhandari
Ranch Hand
Posts: 448
Eclipse IDE Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ajax is best for this purpose as it is light on network trip and is cool
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic