D
daSharp
I would like to add a javascript function call to the SideBarButton in an
ASP:Wizard control in ASP 3.5.
I have a onbeforeunload function defined that I do not want to execute
everytime the user clicks on a menu item in the sidebar. It should only be
called when the user closes the web page. I would like to set a var when the
user clicks a menu item that the onbeforeunload function can evaluate and
know to skip the onbeforeunload function for this postback.
This is the javascript on the webpage:
<script type="text/javascript">
var IGNORE_UNLOAD = false;
function doBeforeUnload()
{
if (IGNORE_UNLOAD = false)
{
document.getElementById('<%=btnLogout.ClientID %>').click();
//Call the hidden logout button click event ;
}
}
if(window.body)
window.body.onbeforeunload = doBeforeUnload; // IE
else
window.onbeforeunload = doBeforeUnload; // FX
</script>
I need a way to set the var IGNORE_UNLOAD = true from a menu click in the
wizard.
Thanks.
Don Sharp
ASP:Wizard control in ASP 3.5.
I have a onbeforeunload function defined that I do not want to execute
everytime the user clicks on a menu item in the sidebar. It should only be
called when the user closes the web page. I would like to set a var when the
user clicks a menu item that the onbeforeunload function can evaluate and
know to skip the onbeforeunload function for this postback.
This is the javascript on the webpage:
<script type="text/javascript">
var IGNORE_UNLOAD = false;
function doBeforeUnload()
{
if (IGNORE_UNLOAD = false)
{
document.getElementById('<%=btnLogout.ClientID %>').click();
//Call the hidden logout button click event ;
}
}
if(window.body)
window.body.onbeforeunload = doBeforeUnload; // IE
else
window.onbeforeunload = doBeforeUnload; // FX
</script>
I need a way to set the var IGNORE_UNLOAD = true from a menu click in the
wizard.
Thanks.
Don Sharp