Getting bibliographica content via jquery
Mark MacGillivray - February 16, 2011 in docs, JISC OpenBib, jiscopenbib, News, OKFN Openbiblio
It is possible to get records of the British Library dataset by requesting output from bibliographica via jquery. Here is an example:
<!-- get a copy of jquery locally -->
<!--
-->
<!-- get a copy of jquery from google CDN -->
<!-- add the jquery to do useful stuff -->
// on document ready, do something
$(document).ready(function() {
// insert a hello world to check this is working
$('body').html("hello world");
// do an ajax jquery call
// this just callls to a url
// which is at http://bnb.bibliographica.org
// appended with
// /entry/GB5000065.json to get that particular record in json
$.ajax(
{ type: "get",
url: "http://bnb.bibliographica.org/entry/GB5000065.json",
dataType: "json",
success: function(data) {
// on success, do something with the output data
for ( item in data ) {
alert("here is an item name " + item);
}
},
}
);
})
<!-- we do not need anything in here -->
This works in Firefox at least…
Planet Open Knowledge