Print

Print


Thanks again, Heather. I got some ideas from your code and made my own version with only a single line (for starters) of jQuery: 

   $('#mapmybook').attr('href', 'http://www.lib.cwu.edu/iii/mapit.php?call_num=' + $(".bibItemsEntry td:nth-child(2) a").html()); 

Need to add a bit of more code to handle things like bib_display.html pages that don't have a call number to parce, but I'm in business now. 

The funny thing is, I looked at your code and thought it looked familiar, and then I realized it was the same SMS system of scripts that we were using. (The ones from U of O, I believe) 

Thanks to Joshua & Bob for the extra tips. 


- Gavin 


>>> "Klish, Heather J" <[log in to unmask]> 10/9/2012 12:13 PM >>>
Hi Gavin,

Here's some javascript that grabs the call number.  This code is part of a script that someone wrote (I can't remember who at the moment) to send text messages from the catalog.  You may have to change some of the id names based upon what's being used in your catalog.  Also, there may be another way if you ask on the IUG listserv.

<!cript>
  var f = document.getElementById('bibDetails');
try {
var itms = document.getElementById('bibItems');
var tr = itms.getElementsByTagName('TR');
  for(i = 1; i < tr.length; i++) {
    var x=tr[i].getElementsByTagName('TD');
    if (x.length == 3) {
      var loc = x[0].innerHTML.replace(/(<([^>]+)>|&nbsp;)/ig,"");
      var call = x[1].innerHTML.replace(/(<([^>]+)>|&nbsp;)/ig,"");
      var status = x[2].innerHTML.replace(/(<([^>]+)>|&nbsp;)/ig,"");
    }
}

} catch (e) {
document.getElementById('smsfeatures').style.visibility='hidden';
}

</script>


Heather

- - - - - - - - - - - - - - - - -
Heather Klish
Systems Librarian
University Library Technology
[log in to unmask]
617.627.5853


-----Original Message-----
From: Code for Libraries [mailto:[log in to unmask]] On Behalf Of Gavin Spomer
Sent: Tuesday, October 09, 2012 2:29 PM
To: [log in to unmask]
Subject: [CODE4LIB] Getting The Call Number In bib_display.html On III System

Hello folks,

I'm trying to figure out the III web dev interface in the Millenium java client. What a clunky, rinky-dink interface, IMHO! :)

I want to be able to display an item's call number in bib_display.html so I can feed it to a php script on another web server. It was suggested to me that the token for that was:

   <!--{itemcallno}-->

I tried that on our staging site, but it does not display anything. Specifically, I put in:

   <a href="http://testingserver.cwu.edu/myapp.php?callnum=<!--{itemcallno}-->">TEST-LINK</a>

The link with text "TEST-LINK" displayed, but the callnum parameter wasn't added.

Can anyone point this guy in the right direction?
Gavin Spomer
Systems Programmer
Brooks Library
Central Washington University