[Koha-devel] Repeatable field

Stefano Bargioni bargioni at pusc.it
Wed May 21 09:44:58 CEST 2014


Maybe before loading the image, your script could run

var isbn = 'XXXX';
isbn = isbn.split(/ /)[0]; // save only the first occurrence
isbn = isbn.replace(/-/g,''); // strip out hyphens
var cover_url = 'http://content-3.powells.com/cgi-bin/imageDB.cgi?isbn='+isbn

or something similar.
HTH. Stefano
On 20/apr/2014, at 13.48, Partha Mukhopadhyay wrote:

> Dear all
> 
> We are trying to implment carousel in koha with the cover image from Powells/Amazon through ISBN. It's working fine with documents having one ISBN number (or if we modify records by deleting second or third occurance of ISBN). The linking works in JQuery through http://content-3.powells.com/cgi-bin/imageDB.cgi?isbn=XXXX (xxxx is ISBN). Obviously in case of two ISBN or if ISBN contains text (like paperback, hardcover etc), this method is nor working. Now the question is - 1) Is there any way to extract the only first occurance of a repeatable field? 2) Can we pick up the only ISBN numver excluding associated text in ISBN tag? 3) Any other option except this?
> 
> Dr. Parthasarathi Mukhopadhyay
> 



__________________________________________________
Il tuo 5x1000 al Patronato di San Girolamo della Carita' e' un gesto semplice ma di grande valore.
Una tua firma aiutera' i sacerdoti ad essere piu' vicini alle esigenze di tutti noi.
Aiutaci a formare sacerdoti e seminaristi provenienti dai 5 continenti indicando nella dichiarazione dei redditi il codice fiscale 97023980580.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20140521/8425fae4/attachment.html>


More information about the Koha-devel mailing list