WebVoyage 7 (Tomcat) Timeout Message Alternative
Tags: WebVoyage 7, Tomcat, timeout, timer, css, JavaScript
Last Updated: Oct 30, 2009 02:09
- Description
This is an alternative to the intrusive default timeout alert message. When the default popup appears, it takes over all browser activity until the user dismisses the message. It doesn't give the user any instruction as to how to continue the session or how to dismiss the session and start a new one.
With this revised version, when the timer runs out, a draggable message appears that allows the user to refresh the session or start a new session. - Author: Jim Robinson
- Additional author(s):
- Institution: Tarrant County College District (Not State Library of Tasmania... what a commute!)
- Year: 2008
- License: BSD style
- Short description: Use, modification and distribution of the code are permitted provided the copyright notice, list of conditions and disclaimer appear in all related material.
- Link to terms: [Detailed license terms]
- Skill required for using this code:
basic
State
Stable
Programming language
DHTML (JavaScript + CSS)
Software requirements
WebVoyage 7 (Tomcat)
Screen captures
Author(s) homepage
http://lib-serv.tccd.edu/code/
Download
tcc_timeout_javascript.js
tcc_timeout_stylesheet.css
Working example
http://library.tccd.edu/vwebv/searchBasic
Changes
Version 1.1 ....
Version 1.1 released 2009-MAR-30.
Released 1.0
Release notes
1.1 displays the remaining seconds in the window.
1.0 is the initial release
Installation instructions
This process requires creation of or changes to 4 files:
- A stylesheet
- A JavaScript
- /m1/voyager/xxxdb/tomcat/vwebv/context/vwebv/ui/skin/xsl/pageFacets/footer.xsl
- /m1/voyager/xxxdb/tomcat/vwebv/context/vwebv/ui/skin/xsl/pageTools/frameWorks.xsl
Step 1: The Stylesheet. Create your own css file (ours is called tcc_timeout_stylesheet.css) and save it in /m1/voyager/xxxdb/tomcat/vwebv/context/vwebv/ui/skin/css/:
Step 2: The JavaScript. In your own JavaScript file (ours is called tcc_timeout_javascript.js), add the following functions and save the file in /m1/voyager/xxxdb/tomcat/vwebv/context/vwebv/ui/skin/jscripts/:
Step 3: The Footer. Now, create the message. In /m1/voyager/xxxdb/tomcat/vwebv/context/vwebv/ui/skin/xsl/pageFacets/footer.xsl, add the timeout container between </xsl:for-each> and </xsl:template>:
Step 4: The FrameWork. Revise the Ex libris timeout call and add your CSS and JavaScript files.
In /m1/voyager/xxxdb/tomcat/vwebv/context/vwebv/ui/skin/xsl/pageTools/frameWork.xsl, add the following (changes are boldface):
<script type="text/javascript" src="{$jscript-loc}pageInputFocus.js"/>
<script type="text/javascript" src="{$jscript-loc}tcc_timeout_javascript.js"/>
...more code here...
<style type="text/css" media="screen,print">@import "<xsl:value-of select="$css-loc"/>tcc_timeout_stylesheet.css";</style>
<xsl:comment><![CDATA[[if IE]> <style type="text/css" media="screen,print">@import "ui/en_US/css/ieFixes.css";</style> <![endif]]]></xsl:comment>
In the same file, change the Ex Libris timeout call (changes are boldface):
<script type="text/javascript">
var msg;
var timeOut;
var seconds;
function timedMsg(time, grace, txtMsg)
{
msg = txtMsg;
timeOut = (time - grace) * 60000;
seconds = grace * 60;
//setTimeout("alert(msg)", timeOut);
setTimeout("tcc_display_timeout(msg)",timeOut);
}
</script>
| Changes to existing files are in boldface. Find the text that is not bold, then make the changes as indicated. |
| You're backing up all your files before making changes to them, right? |
| Don't forget to change xxxdb, skin, and anything else in bold. |
| If you've named your stylesheet something other than tcc_timeout_stylesheet.css, make sure you're pointing to the right file in the last step. |
| The same goes for your JavaScript file. |
TO DO list
None at the moment.
Known issues
No known issues.
Comments


1 Comment
comments.show.hideMay 19, 2009
Haihua Li
We like this new improved timeout script and have added it into our 7.03. If the browser tab could flashout when the pop-up window is showing up, it has another added value.
http://ils.lib.mtu.edu:7008/vwebv/searchBasic