Access Keys:
Skip to content (Access Key - 0)
My Area (Access Key - 2)


Toggle Sidebar
Your Rating: Results: PatheticBadOKGoodOutstanding! 6 rates
Labels:
basic basic Delete
timeout timeout Delete
timer timer Delete
css css Delete
javascript javascript Delete
webvoyage7 webvoyage7 Delete
tomcat tomcat Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

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://library.tccd.edu

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




Page Attachments

File NameCommentSizeNumber of Downloads
tcc_timeout_javascript.jsv1.1, 2009-MAR-303 kB143
tcc_timeout_stylesheet.cssv1.1, 2009-MAR-301 kB100
delete3.txtDelete2 kB79
delete.txtDelete2 kB80
delete2.txtDelete This2 kB86
delete4.txtDelete0.5 kB84

Added by Jim Robinson on Sep 29, 2008 18:46, last edited by Conf Admin on Oct 30, 2009 02:09

  1. May 19, 2009

    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

Adaptavist Theme Builder Powered by Atlassian Confluence