Hey guys,

My team mates and I are developing an application with ajax and struts. It has so far been a very good experience. The problem we are facing now is we would like to have a confirmation whenever a user who is filling in information in a form, wants to go to another link. I'm currently using the confim(). My idea is that when the user clicks "OK", it forwards that link and when they press "Cancel", it will return to the form and all the data (keyed in and populated using ajax) will still be there. The source of the problem is that we're using ajax and whenever the the cancel button is pressed the page automatically refreshes and all the data is gone. How do I solve this problem? Is there another way to implement confirmation so that the data(keyed in and populated using ajax) will still be intacted ? Thanks in advance.