Novell Home

My Favorites

Close

Please to see your favorites.

Howto prompt iChain users to refresh session before expiration

(Last modified: 26May2005)

This document (10097802) is provided subject to the disclaimer at the end of this document.

fact

iChain 2.3

iChain 2.2

Authentication enabled

Cookie expires

symptom

Howto prompt iChain users to refresh session before expiration

Howto warn iChain users about session timeouts

Howto enable iChain timeout popup box

fix

Use the following javascript code in the iChain login page. It will check whether the session is approaching the 'idle session timeout' parameter and if so, prompt the user to extend the session.

Note: Stick these in the script portion of your <head> tag. And call the timeoutClock function in your body onload. (<body onload=timeoutClock();)

var x = 600; //20 minutes
var timerID = null;

function timeoutClock()
{
timerID = setTimeout(timeoutClock(), 1000); //run every second 
if(x==30) 
    { 
     newwindow = window.open(path/to/timeout_page.html,toWindow,toolbar=no,menubar=no,resizable=no,scrollbars=no,status=no,location=no,width=300,height=200); 
     }

if(x==0)
    {
     window.location.href = path/to/time_expired.html;
    }

x=x-1;
return;
}

// Function to reset the timeout
function resetClock()
{
ClearTimeout(timerID);
x = 600;
timeoutClock();
return;
}

Then all you need to do is create the expired page (e.g time_expired.html) and the timeout page (e.g. timeout_page.html) with the messaging you choose. Be sure to have a link on the timeout page similar to:

Click <a href=javascript:window.opener.location.href = window.opener.location.href;window.close();>[here]</a> to refresh now.

Also, you may want to have the timeout page close itself after 29 seconds by calling this closeMe function in the body onload:

var howLong = 29000;
t = null;
function closeMe()
{
t = setTimeout(self.close(),howLong);
}

Reference URL for the above script is: http://www.devguru.com/Technologies/ecmascript/quickref/win_settimeout.html

disclaimer

The Origin of this information may be internal or external to Novell. Novell makes all reasonable efforts to verify this information. However, the information provided in this document is for your information only. Novell makes no explicit or implied claims to the validity of this information.
Any trademarks referenced in this document are the property of their respective owners. Consult your product manuals for complete trademark information.

  • Document ID:
  • 10097802
  • Solution ID: NOVL102225
  • Creation Date: 26May2005
  • Modified Date: 26May2005
    • NetIQiChain

Did this document solve your problem? Provide Feedback