Auto-Populating an ILL form using OpenURL and JavaScript

Download Report

Transcript Auto-Populating an ILL form using OpenURL and JavaScript

Auto-Populating an ILL
form using OpenURL
and JavaScript
Sarah G. Park
Web Development/Reference Librarian/Instructor
How It Works:
How It Worked:
1. No full-text is found?
2. Want a copy?
3. Please type in the information
• Problems?
• Inaccurate information
• Extra work
Research:
• OpenURL = A URL embedding citation information
• BaseURL + Description URL
• http://www.nwmissouri.edu/library/ill/photocopy.htm?issn=000
1253X&title=Aslib+proceedings&volume=64&issue=5&date=201
2-0901&atitle=Promoting+African+indigenous+knowledge+in+the+kn
owledge+economyExploring+the+role+of+higher+education+and
+libraries.&spage=540&pages=&aulast=Moahi%2C+Kgomotso+H.
• Auto-Populating an ILL from with the Serial Solutions Link
Resolver API by Daniel Talsky
Problem:
• “The most reliable way to extract this information
from the query string and place it into your ILL form is
by using a server-side scripting language like
ASP/VBScript, PHP, Perl, JSP, or ColdFusion”
(SerialsSolutions, 2008).
• Solutions listed above require programming
knowledge, server side configuration, and/or extra
software
Then What?
• Client-side scripting (such as JavaScript) + HTML Form
• A Support Call to SerialsSolutions
• A URL from 360Link
• http://www.nwmissouri.edu/library/ill/photocopy.htm?issn
=15480666&title=International+journal+of+knowledge+ma
nagement&volume=8&issue=1&date=2012-0101&atitle=Knowledge+Bases+Over+Algebraic+Models%3A+
Some+Notes+About+Informational+Equivalence.&spage=22
&pages=&sid=EBSCO%3ALibrary%2C+Information+Science+
%26+Technology+Abstracts&aulast=Knyazhansky%2C+Mari
na&genre=article
The Secret JavaScript Code
function getUrlVars() {
todayDate();
var vars = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
vars[key] = value;
});
try
{
document.forms["IIRequest"].Periodical.value = decode(vars["title"]);
document.forms["IIRequest"].Volume.value = decode(vars["volume"]);
document.forms["IIRequest"].Number.value = decode(vars["issue"]);
document.forms["IIRequest"].PerDate.value = decode(vars["date"]);
if (decode(vars["pages"]) == "")
document.forms["IIRequest"].Pages.value = decode(vars["spage"]);
else
document.forms["IIRequest"].Pages.value = decode(vars["pages"]);
document.forms["IIRequest"].Author.value = decode(vars["aulast"]);
document.forms["IIRequest"].Title.value = decode(vars["atitle"]);
document.forms["IIRequest"].ISSN.value = decode(vars["issn"]);
}
catch(e){};
}
Our Solution
Any Question or
Comment?
Sarah G. Park
Web Development/Reference Librarian
[email protected]