A
Alejandro Penate-Diaz
Hi. I need to ask the user whether to save the information on a page to a
sql server when exiting or navigating away, so I am using this code when
clicking the X button. the Button8 does that when clicked so I am reusing
it:
function HandleOnClose()
{
if (event.clientY < 0)
if (confirm("OK to save changes. Cancel to exit without saving.") )
__doPostBack('Button8','')
}
The code above works fine, problem comes with the following code that I am
using when the user clicks a link to another page, code
__doPostBack('Button8','') is never executed. is there a simple work around
for what I want to do?:
function goToAnotherPage()
{
if (confirm("OK to save changes. Cancel to show Another Page without
saving.") ) __doPostBack('Button8','');
window.navigate("another_page.aspx");
}
sql server when exiting or navigating away, so I am using this code when
clicking the X button. the Button8 does that when clicked so I am reusing
it:
function HandleOnClose()
{
if (event.clientY < 0)
if (confirm("OK to save changes. Cancel to exit without saving.") )
__doPostBack('Button8','')
}
The code above works fine, problem comes with the following code that I am
using when the user clicks a link to another page, code
__doPostBack('Button8','') is never executed. is there a simple work around
for what I want to do?:
function goToAnotherPage()
{
if (confirm("OK to save changes. Cancel to show Another Page without
saving.") ) __doPostBack('Button8','');
window.navigate("another_page.aspx");
}