i m using onbeforeunload function to get the pop up before navigate away from the
current page pop up will show below message,
------------------------------------------------------
Are you sure want to navigate away from this page !
!
< my customize Message >
Press OK to continue OR Cancel to stay on the page
-------------------------------------------------------
these three lines are coming middle one is my customise line
now i want to show only my customize message what to do?
i searched on net but didn't got any answer.
OR
when i not passing my customize message there is a more space in line 1 and line 3
if i want to remove that space what should be done.
thank you in advance its urgent...
here is my code
-----------------------------
function OnClosWindow() {
if (window.confirm('Are you sure you want to navigate away from this page?\n\nYou have not submitted any narrowings for the candidates.\n\nPress OK to continue, or Cancel to stay on the current page.')) {
reload = true;
return true;
}
else {
return false;
}
}
var reload = false;
function resetreload() {
reload = true;
}
function isNavigating() {
if (!reload) {
reload = false;
return "You sures";
}
}
window.onbeforeunload = isNavigating;
--------------------------------------------------------
<a href="http://www.google.com">Navigate HyperLink</a><br />
<asp:Button ID="Button2" runat="server" Text="No Navigate Away" OnClientClick="return resetreload();" />
<asp:Button ID="Button1" runat="server" Text="Navigate Away" OnClientClick="return OnClosWindow();" />
please help need solution