Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

113 lines (102 sloc) 3.921 kb
<html>
<head>
<script type="text/javascript" language="JavaScript">
var request = false;
try {
request = new XMLHttpRequest();
} catch (trymicrosoft) {
try {
request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (othermicrosoft) {
try {
request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (failed) {
request = false;
}
}
}
if (!request)
alert("Error initializing XMLHttpRequest!");
function simpleHttpRequest() {
var myTag = document.getElementById("selectTagId").value;
var myFormat = document.getElementById("selectFormatId").value;
var myUrl = document.getElementById("textInput").value;
if (myFormat == "jsonp") {
var myCallback = "callback"
}
var pathname = "/library-availability/"+myTag;
var search1 = "id="+encodeURIComponent(myUrl);
var search2 = "format="+myFormat;
if (myCallback) {
var url = location.protocol+"//"+location.host+pathname+"?"+search1+"&"+search2+"&callback="+myCallback;
} else {
var url = location.protocol+"//"+location.host+pathname+"?"+search1+"&"+search2;
}
request.open("GET", url, true);
request.send(null);
request.onreadystatechange = function() {
if (request.readyState == 4) {
if (request.status == 200)
success(request.responseText);
else if (failure)
failure(request.status, request.statusText);
}
};
}
function success(responseText) {
var textarea = document.getElementById("textoutput");
textarea.value = responseText;
}
function failure(responseStatus, responseText) {
var textarea = document.getElementById("textoutput");
textarea.value = responseStatus + " " + responseText;
}
</script>
</head>
<body>
<p>Test Page</p>
<p>
[http://solo.bodleian.ox.ac.uk/primo_library/libweb/action/display.do?doc=UkOxUUkOxUb15585873&vid=OXVU1&fn=display&displayMode=full]
<br /><br />
[http://oxfordsfx-direct.hosted.exlibrisgroup.com/oxford?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2010-12-17T17%3A09%3A33IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-elsevier&rft_val_fmt=info:ofi/fmt:kev:mtx:&rft.genre=article&rft.atitle=Chemical%20changes%20that%20predispose%20smoked%20Cheddar%20cheese%20to%20calcium%20lactate%20crystallization&rft.jtitle=Journal%20of%20Dairy%20Science&rft.btitle=&rft.aulast=Rajbhandari&rft.auinit=&rft.auinit1=&rft.auinitm=&rft.ausuffix=&rft.au=Rajbhandari,%20P.&rft.aucorp=&rft.date=200908&rft.volume=92&rft.issue=8&rft.part=&rft.quarter=&rft.ssn=&rft.spage=3616&rft.epage=3622&rft.pages=3616-3622&rft.artnum=&rft.issn=00220302&rft.eissn=&rft.isbn=&rft.sici=&rft.coden=&rft_id=info:doi/10.3168/jds.2009-2157&rft.object_id=&rft_dat=%3Celsevier%3EOM09120A_00220302_00920008_09706824%3C/elsevier%3E&rft.eisbn=&rft_id=http%3A%2F%2Fsolo.bodleian.ox.ac.uk%2Fprimo_library%2Flibweb%2Faction%2Fdisplay.do%3Fdoc%3DTN_elsevierOM09120A_00220302_00920008_09706824%26vid%3DOXVU1%26fn%3Ddisplay%26displayMode%3Dfull]
</p>
<p>
<table>
<tr>
<td valign="top">Query Library/Eias:</td>
<td>
<select id="selectTagId">
<option selected="selected" value="library">library</option>
<option value="eias">eias</option>
</select>
<select id="selectFormatId">
<option selected="selected" value="json">Json</option>
<option value="jsonp">Json_P</option>
<option value="xml">xml</option>
</select>
</td>
</tr>
<tr>
<td valign="top">Enter Resource Id:</td>
<td>
<textarea id="textInput" cols="80" rows="5">
</textarea>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<input type="button" value="submit" onclick="simpleHttpRequest(this.value)" />
</td>
</tr>
<tr>
<td valign="top">Response:</td>
<td>
<textarea id="textoutput" cols="80" rows="25">
</textarea>
</td>
</tr>
</table>
</p>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.