200
edits
Changes
no edit summary
== Overview ==
You need to specify your will first include an Umlaut base URL in a global javascript variable called umlaut_base. This is not your link resolver base url which for Umlaut ends in /resolvefile, but and then call the actual Umlaut application base URL, which should be the same, without the /resolveembedUmlaut() js function it supplies. (Link You'll need to pass some arguments to JHU example removed, because i think it was attracting malicious bot/spider traffic)embedUmlaut.
The umlaut_embed.js script will check if the javascript Prototype library is loaded into the host page, and load it if not. Among other things, this means you can use Prototype in your callbacks.
<script type="text/javascript">
// You have to generate an OpenURL context object somehow, and set it in a js global var.
// Normally this would be generated dynamically, not static HTML like this, of course.
// You may want to include a rfr_id to identify your application as a source, demo below.
umlaut_openurl_kev_co = 'url_ver=Z39.88-2004&rft_val_fmt=info:ofi/fmt:kev:mtx:journal&rft_id=info:doi/10.1002/jez.1401770202&rfr_id=info:sid/university.edu:myapplication&rft.genre=article&rft.jtitle=J.%20Exp.%20Zool&rft.date=1971&rft.atitle=Cytoplasmic%20control%20of%20nuclear%20behavior&rft.aulast=Masui';
// set global js var to tell script where to find umlaut
umlaut_base = 'http://umlaut.university.edu';
}
};
//global embedUmlaut options
//demonstrate putting up an alert when Umlaut is done loading all content, which you
//wouldn't want to do, but anyway.
umlaut_options = {
'all-complete-callback': function() { alert('All done!'); }
}
</script>
<!-- now actually load the umlaut js helper, which will do the magic for you -->
<script type="text/javascript" src="http://umlaut.university.edu/javascripts/embed/umlaut-embed.js"> <!-- and call embedUmlaut --> <script type="text/javascript"> embedUmlaut(umlaut_base, umlaut_openurl_kev_co, umlaut_section_map, umlaut_options); </script> </script>