How to implement "Are you sure you want to leave?"
31 views
Skip to first unread message
sib
unread,
Aug 24, 2011, 11:50:54 AM8/24/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Web Toolkit
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
Thomas Broyer
unread,
Aug 24, 2011, 12:05:05 PM8/24/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message