A
Andoni
Hi,
I am only writing for IE 5.5+ so no need for compatibility at all ;-)
I am trying to get my users to logoff which they finish on a particular
page. This is no problem (or should be no problem) as I can just put a
location.replace('http://www.mysite.com/html/logoff.jsp'); into the onUnload
event of the page they always finish on. This should fire when they click
the X in the corner (my app. is in a popup window) instead of hitting exit.
Unfortunately this won't work for me as it won't go to the page from the
onUnload= event unless I put an alert box in the method called like this:
(Example 1 does not work):
function endSession()
{
if(!submitting)
{
// end session.
location.replace('http://www.mysite.com/jsp/logoff.jsp');
}
return false;
}
function endSession()
{
if(!submitting)
{
// end session.
location.replace('http://www.mysite.com/jsp/logoff.jsp');
alert('in endSession()');
}
return false;
}
Can anyone shed any light on why the second one works? What can I use
instead of an alert box?
Thanks in advance,
Andoni.
I am only writing for IE 5.5+ so no need for compatibility at all ;-)
I am trying to get my users to logoff which they finish on a particular
page. This is no problem (or should be no problem) as I can just put a
location.replace('http://www.mysite.com/html/logoff.jsp'); into the onUnload
event of the page they always finish on. This should fire when they click
the X in the corner (my app. is in a popup window) instead of hitting exit.
Unfortunately this won't work for me as it won't go to the page from the
onUnload= event unless I put an alert box in the method called like this:
(Example 1 does not work):
function endSession()
{
if(!submitting)
{
// end session.
location.replace('http://www.mysite.com/jsp/logoff.jsp');
}
return false;
}
function endSession()
{
if(!submitting)
{
// end session.
location.replace('http://www.mysite.com/jsp/logoff.jsp');
alert('in endSession()');
}
return false;
}
Can anyone shed any light on why the second one works? What can I use
instead of an alert box?
Thanks in advance,
Andoni.