You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "alessandro.rieti@virgilio.it" <al...@virgilio.it> on 2010/12/09 18:27:46 UTC

(Nessun oggetto)

Dear all,I'm trying to call our solr server
with the json parameter in order to parse it on the client side which
is javascript.
My problem is that when I try the
call (see the code below) using the wiki instructions
(http://wiki.apache.org/solr/SolJSON)
the XMLHttpRequest object gets blank when using the W3C standard
rather then the Microsoft ActiveX which is working just fine.
Do you know if there is some further
implementation I have to use in order to get the standard
implementation working??



function
xmlhttpPost(strURL) {
   
var
xmlHttpReq = false;
   
var
self = this;
    if
(window.XMLHttpRequest) { //
Mozilla/Safari
      
 self.xmlHttpReq = new
XMLHttpRequest(); 

    }
   
else
if
(window.ActiveXObject) { // IE
      
 self.xmlHttpReq = new
ActiveXObject("Microsoft.XMLHTTP");
    }
   
self.xmlHttpReq.open('GET',
strURL, true);
   
self.xmlHttpReq.setRequestHeader('Content-Type',
'text/plain;charset=UTF-8'
);    

    

   
self.xmlHttpReq.onreadystatechange
= function()
{
   	
       if
(self.xmlHttpReq.readyState == 4) {
      
     updatepage(self.xmlHttpReq.responseText);
      
 }
    }

   
var
params = getstandardargs().concat(getquerystring());
   
var
strData = params.join('&amp;');
   
self.xmlHttpReq.send(strData);
}
Thanks,Alessandro