Testing sharepoint search web service using jquery

This is a code to test the search web service in SharePoint. Here is the Javascript part
function SoapSearchCaller(){
 var queryXml = "";
    var soapEnv = "";
    
    queryXml = jQuery("#inptextarea").val();
 
 soapEnv += "";
 soapEnv += '';
    soapEnv += '';
    soapEnv += '';
 soapEnv += escapeHTML(queryXml);
    soapEnv += '';
    soapEnv += '';
 soapEnv += '';
 soapEnv += '';

    jQuery.ajax({
        url: "/_vti_bin/search.asmx",
        type: "POST",
        dataType: "xml",
        data: soapEnv,
        complete: CIToolsProcessResult,
        contentType: "text/xml; charset=\"utf-8\""
    });
};

// process the results from the web service
function CIToolsProcessResult(xData, status) {
 jQuery("#Response").append(""+status+"");    
 jQuery("#Response").append(xData.responseText);    
}; // end of processResult
Here is the HTML part


Submit
-
Clear


Response

0 comments :: Testing sharepoint search web service using jquery