Skip to main content
ExLibris
  • Subscribe by RSS
  • Ex Libris Knowledge Center

    OPAC: WebVoyáge Timeout Counter Display

    Created By: Fiona Thomson
    Created on: 5/14/2019



    [This article was copied from the Voyager Wiki.]

    A script which runs a countdown timer for Webvoyage OPAC displaying session time remaining on the bottom of the browser screen. Document OPAC timeoutcounterUniSA200703.doc contains javascript script and html call to function "timer", which counts from 6 minutes down.

    University of South Australia Library catalogue, http://catalogue.library.unisa.edu.au  has a timeout counter display. The script is appended below.  The catalogue.js script needs to be placed in the ...\xxxdb\webvoyage\html directory.

    You will need to add the following lines to the header.htm file (in the ...\xxxdb\etc\webvoyage directory) to call the script when WebVoyáge starts:
               <script type="text/javascript" src="/catalogue.js"></script>
                  <script>timer();</script>

    Best regards,
    Daniela

    A. 

    You will need to add the following two lines to the header.htm file (in the ...\xxxdb\etc\webvoyage directory) to call the script when WebVoyage starts:

    <script type="text/javascript" src="/catalogue.js"></script>
    <script>timer();</script>

     

    for example

    <head>

    <link rel="stylesheet" href="/global.css" type="text/css"/>

    <script type="text/javascript" src="/catalogue.js"></script>

    <script>timer();</script>

    </head>

     

    You may wish to add them into other header type pages – for example we have a loginhdr.html

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">

    <HTML>

    <HEAD>

    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">

    <META HTTP-EQUIV="Expires" CONTENT="-1">

    <TITLE>WebVoyage Patron Logon</TITLE>

    </HEAD>

    <BODY onLoad="document.authform.username.focus()">

    <link rel="stylesheet" href="/global.css" type="text/css"/>

    <script type="text/javascript" src="/catalogue.js"></script>

    <script>timer();</script>

    <table width="100%" height="70" border="0" cellspacing="0" cellpadding="0">

      <tr>

        <td width="215"><img src="/images/banner1.gif" width="215" height="70" usemap="#banner1" border="0"><map name="banner1"><area shape="rect" coords="0,0,33,41" href="http://www.unisa.edu.au"><area shape="rect" coords="33,0,213,72" href="/cgi-bin/Pwebrecon.cgi?DB=local&PAGE=First"></map></td>

        <td width="100%"><a href="/cgi-bin/Pwebrecon.cgi?DB=local&PAGE=First"><img src="/images/banner2.gif" width="100%"height="70" border="0"></a></td>

        <td width="358"><a href="/cgi-bin/Pwebrecon.cgi?DB=local&PAGE=First"><img src="/images/banner3.gif" width="358" height="70" border="0"></a></td>

      </tr>

    </table>

    B.

    The script   catalogue.js  is put in   ...\xxxdb\webvoyage\html directory    

    <!--

     

    // University of South Australia Library - JavaScript code Library //

    // various functions stored in this file - showing WebVoyáge timeout countdown

     

    // status bar session timer

    var limit="6:00"

    var time=limit.split(":")

    time=time[0]*60+time[1]*1

     

    function timer(){

    if (time==1)

    {

    window.status="Session timed out"

    window.location.href="http://your.catalogue.address/cgi-bi...cal&PAGE=First"

    }

    else{

    time-=1

    mins=Math.floor(time/60)

    secs=time%60

    if (secs<10)

    secs="0"+secs

    if (mins!=0)

    status="Session time remaining: "+mins+":"+secs+" minutes"

    else

    status="Session time remaining: "+secs+" seconds"

    window.status=status

    setTimeout("timer()",1000)

    }

    }

    //-->

     

    WebVoyáge Timeout Counter Display

     




    • Was this article helpful?