J
Jonathan
Hi Everyone,
I have a problem which I've been able to reproduce with a nice and
small test ASP.NET web application. The page sets the
window.onbeforeunload event so that we will get an Ok/Cancel dialog box
to prompt users before navigating away from the page. There are many
different types of input buttons on the page (e.g. asp:Button,
asp:ImageButton, asp:LinkButton, aspropDownList, asp:CheckBox) and
most of them work fine. However, two of these controls don't work so
well: aspropDownList and asp:CheckBox (both controls have the
attribute AutoPostBack="True"). If the user clicks Cancel on the prompt
before the page unloads, an "unspecified error" is thrown in
javascript. Please could somebody point me in the right direction
towards fixing my code?
Many thanks,
Jonathan
P.S. I can provide the zipped source of the test project if anybody
thinks it might help them.
I have a problem which I've been able to reproduce with a nice and
small test ASP.NET web application. The page sets the
window.onbeforeunload event so that we will get an Ok/Cancel dialog box
to prompt users before navigating away from the page. There are many
different types of input buttons on the page (e.g. asp:Button,
asp:ImageButton, asp:LinkButton, aspropDownList, asp:CheckBox) and
most of them work fine. However, two of these controls don't work so
well: aspropDownList and asp:CheckBox (both controls have the
attribute AutoPostBack="True"). If the user clicks Cancel on the prompt
before the page unloads, an "unspecified error" is thrown in
javascript. Please could somebody point me in the right direction
towards fixing my code?
Many thanks,
Jonathan
P.S. I can provide the zipped source of the test project if anybody
thinks it might help them.