/*
-** $Id: pz2.js,v 1.46 2007-07-12 11:49:20 sondberg Exp $
+** $Id: pz2.js,v 1.48 2007-07-18 13:40:56 adam Exp $
** pz2.js - pazpar2's javascript client library.
*/
//supported pazpar2's protocol version
__myself.suppProtoVer = '1';
- __myself.pz2String = paramArray.pazpar2path || "search.pz2";
+ __myself.pz2String = paramArray.pazpar2path || "/pazpar2/search.pz2";
__myself.stylesheet = paramArray.detailstylesheet || null;
__myself.useSessions = true;
if (paramArray.usesessions != undefined) {
callback = __myself.recordCallback;
}
+ if ( params['handle'] == undefined )
+ handle = {};
+ else
+ handle = params['handle'];
+
if( !__myself.searchStatusOK && __myself.useSessions)
return;
record['xmlDoc'] = data;
if (__myself.currRecOffset !== undefined) {
record['offset'] = __myself.currRecOffset;
- callback(record);
+ callback(record, handle);
} else if ( recordNode = data.getElementsByTagName("record")[0] ) {
// if stylesheet was fetched do not parse the response
if ( __myself.xslDoc ) {
}
}
- callback(record);
+ callback(record, handle);
}
else
// if it gets here the http return code was 200 (pz2 errors are 417)