X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=js%2Fpz2.js;h=9eaae43331fcf925bededb1ddc12bb1671e5b869;hb=fca562549bc185f9bbde0a2bb7219a5083803a46;hp=0dc578db934a35c0ce5e586e44f1836cce35c19f;hpb=8c17e0ef3df38d2f7af3b6ac0afe18baa6c95774;p=pazpar2-moved-to-github.git diff --git a/js/pz2.js b/js/pz2.js index 0dc578d..9eaae43 100644 --- a/js/pz2.js +++ b/js/pz2.js @@ -1,5 +1,5 @@ /* -** $Id: pz2.js,v 1.19 2007-05-21 09:07:43 jakub Exp $ +** $Id: pz2.js,v 1.28 2007-06-01 09:19:58 jakub Exp $ ** pz2.js - pazpar2's javascript client library. */ @@ -383,12 +383,13 @@ pz2.prototype = { } } } + __myself.recordCallback(record); } else // if it gets here the http return code was 200 (pz2 errors are 417) // but the response was invalid, it should never occur - setTimeout("__myself.record(__myself.currRecID)", 1000); + setTimeout("__myself.record(__myself.currRecID)", 500); } ); }, @@ -532,7 +533,7 @@ pzHttpRequest.prototype = var paramArr = new Array(); for ( var key in params ) { - paramArr.push(key + '=' + escape(params[key])); + paramArr.push(key + '=' + encodeURI(params[key]) ); } if ( paramArr.length ) @@ -540,6 +541,8 @@ pzHttpRequest.prototype = var context = this; this.request.open( 'GET', getUrl, true ); + this.request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); + //this.request.setRequestHeader('Accept-Charset', 'UTF-8'); this.request.onreadystatechange = function () { context._handleResponse(); } @@ -650,7 +653,7 @@ pzQuery.prototype = { { var ccl = ''; if( this.simpleQuery != '') - ccl = '"'+this.simpleQuery+'"'; + ccl = this.simpleQuery; for(var i = 0; i < this.advTerms.length; i++) { if (ccl != '') ccl = ccl + ' and ';