Advertisement
preater

Linking from III Encore 4.2 SHL store journal bib record display

Jul 16th, 2012 (edited)
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript">
  2.     var urlindex = document.URL.indexOf('record/C__R');
  3.     recordid = document.URL.substring(urlindex + 11, urlindex + 19);
  4.  
  5.     function stackrequest() {
  6.         var holdingsdiv = document.getElementById('toggleAnyComponent');
  7.         if (holdingsdiv) {
  8.             if (holdingsdiv.innerHTML.match(/STACK SERVICE/)) {
  9.                 stackrecordid = recordid.substring(1);
  10.                 var requeststub = "http://www.ulrls.lon.ac.uk/stackrequest/parse.aspx?record=";
  11.                 var stackrequestDiv = document.createElement('div');
  12.                 stackrequestDiv.innerHTML = '<div style="padding-bottom: 15px;" class="taggingLink">' + '<a id="stackrequestbutton" target="_blank" title="Request from Store" href="' + requeststub + stackrecordid + '">Request from Store</a>' + '</div>';
  13.                 document.getElementById("customTop").appendChild(stackrequestDiv);
  14.             }
  15.         }
  16.     }
  17. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement