or, The Hitchhiker’s Guide to Fear and Loathing at a Public Library Reference Desk


Library Use Value Calculator

This calculator was developed in 2007 as a way for libraries to let patrons calculate how much their use of the library means to them (read the history). In 2009, the calculator was updated to make it easier for libraries to embed into their websites.

If you'd like to put the Library Use Value Calculator on your library's website for your own patrons to use, there are two ways to do it.

 

Option 1: Embed the Code

The easiest way to add the Library Use Value Calculator to your library website is to embed the code below where you would like the calculator to appear. The calculator and associated pages are hosted on the swissarmylibrarian.net server.

Option 1a: Embed the calculator in one of your pages
All you need to do is copy the code from the box below (make sure you copy all of it) and paste it into your web editor where ever you'd like the calculator to appear. See an example of an embedded Calculator.

NOTE: for wordpress.com & Google Pages websites, see Option 1b

cut and paste javascript:

 

Option 1b: Link to a popup calculator (for Wordpress.com & Google Pages websites)
Many free hosted websites (like Wordpress.com and Google Pages) are forbidden from using javascript, so another option is to embed a link to a popup version of the calculator. Like Option 1a, the calculator and associated pages are hosted on the swissarmylibrarian.net server.

This workaround is inelegant, and I apologize for that. The calculator itself is "unbranded," so it still looks as if it is part of your library website, but patrons will see swissarmylibrarian.net in the address bar.

Just copy the code from the box below (make sure you copy all of it) and paste it into your web editor where ever you'd like the calculator link to appear. You can change the link text (between the <a></a> tags) to be whatever text or image you'd like. This is what it will look like: Library Use Value Calculator.

cut and paste javascript:

 

Option 2: Host the Code

The other option is to host the html and javascript code on your own website. The advantage is that you have complete control over the look and costs used, but you will need some html/javascript knowledge to make it work - otherwise, everything you should need is below.

Option 2a: Customize the code from a template
There are three part to the calculator:

  1. The web form that displays the calculator
  2. The javascript that calculates the use values
  3. The html page that explains how the costs were derived

If you'd like to host the code exactly like it appears here, download these two files:

At this point, it should be working. However, if you would like to add or remove any of the services listed, you must make changes in four places:

  1. On the web form itself, and be sure you use unique variable names
  2. In the top portion of the javascript
    • There are two lines here for each service - the cost is at the end of the first line
    • Make sure you name the variables here exactly the same as you did in the web form
  3. At the bottom of the javascript
    • The last two lines are what adds up all the individual line totals to create a grand total at the bottom of the form
    • Be sure to add into the calculation the services you added, or remove those you deleted (again, variable names must be accurate)
  4. In the popup "Explanations of Values" file

 

Option 2b: Customize the code from scratch(ish)
When this calculator was originally published, the Maine State Library deconstructed the code and rewrote it for accessibility compliance.

Their instructions for creating a calculator yourself is available on their website, so I won't recreate it here. Their element-by-element approach is quite helpful if you'd like to host the code yourself, or make changes to it.

 

In Any Case...
I'll be happy to answer questions and help if I can. Please use my contact form to get a hold of me, and I'll get back to you as soon as I can.


Hell, there are no rules here - we are trying to accomplish something.
- Thomas A. Edison