/*
-** $Id: pz2.js,v 1.51 2007-08-30 13:24:37 jakub Exp $
+** $Id: pz2.js,v 1.54 2007-09-10 13:18:53 jakub Exp $
** pz2.js - pazpar2's javascript client library.
*/
//supported pazpar2's protocol version
__myself.suppProtoVer = '1';
- __myself.pz2String = paramArray.pazpar2path || "/pazpar2/search.pz2";
+ if (typeof paramArray.pazpar2path != "undefined")
+ __myself.pz2String = paramArray.pazpar2path;
+ else
+ __myself.pz2String = "/pazpar2/search.pz2";
__myself.useSessions = true;
__myself.stylesheet = paramArray.detailstylesheet || null;
termlist: function()
{
- if( !__myself.searchStatusOK && __.myself.useSessions )
+ if( !__myself.searchStatusOK && __myself.useSessions )
throw new Error('Pz2.js: termlist command has to be preceded with a search command.');
// if called explicitly takes precedence
{
if ( typeof DOM_Element.textContent != 'undefined' ) {
return DOM_Element.textContent;
- } else if (DOM_Element.text ) {
+ } else if (typeof DOM_Element.text != 'undefined') {
return DOM_Element.text;
} else {
throw new Error("Cannot get text content of the node, no such method.");