Getting bibliographica content via jquery

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 -->
&lt;!--

--&gt;

<!-- 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…

This entry was posted in JISC OpenBib, News, OKFN Openbiblio and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *