Stopping navigation away from the page
- From: Yash <yashgt@xxxxxxxxx>
- Date: Wed, 30 Jan 2008 21:22:46 -0800 (PST)
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
.
- Follow-Ups:
- Re: Stopping navigation away from the page
- From: Stevo
- Re: Stopping navigation away from the page
- From: GArlington
- Re: Stopping navigation away from the page
- Prev by Date: Using document.load() to get html NOT xml document
- Next by Date: Submitting form via xmlhttp request
- Previous by thread: Using document.load() to get html NOT xml document
- Next by thread: Re: Stopping navigation away from the page
- Index(es):