Y
Yash
Hi,
In our ASP .NET application we present a form wherein the user has to
input a number of fields. If in the middle of filling the form, the
user accidentally navigates away from the page, either by clicking a
link on the page or hitting an entry in the Favorites or in any way,
we want to present an alert with only the OK button, which when
clicked will keep the user on the same page and avoid the navigation
out of the page.
If we do it in the onbeforeunload event, we get a standard popup with
OK and CANCEL. When Cancel is clicked, the user navigates away. We
want to avoid this.
Can you please suggest a way? Is there a way to capture the navigation
event and suppress it?
Thanks,
Yash
In our ASP .NET application we present a form wherein the user has to
input a number of fields. If in the middle of filling the form, the
user accidentally navigates away from the page, either by clicking a
link on the page or hitting an entry in the Favorites or in any way,
we want to present an alert with only the OK button, which when
clicked will keep the user on the same page and avoid the navigation
out of the page.
If we do it in the onbeforeunload event, we get a standard popup with
OK and CANCEL. When Cancel is clicked, the user navigates away. We
want to avoid this.
Can you please suggest a way? Is there a way to capture the navigation
event and suppress it?
Thanks,
Yash