Wednesday, August 24, 2011

How to implement "Are you sure you want to leave?"

Hi All,

I've been trying to emulate the "Are you sure you want to leave"
prompt before someone leaves a page without saving their data. My
problem is that when i get the ValueChangeEvent the token has already
been pushed into the history so when user selects "stay on the page"
even if i ignore the event and don't change the page, the value in the
browser history has already changed!! (So even though user chose to
stay it shows the new token in address bar)

Is there a way to intercept the event before it's pushed to the
history stack? or somehow rewind the stack? or a common trick used for
this purpose?

Thanks in advance
Sina

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate