autocomplete not working with datasource as localhost solr
<p>I am trying to do an autocomplete using jquery where the remote datasource is localhost solr. Its not showing the result. When using firebug i found the error as in <code>jquery.js line 8240: xhr.send( ( s.hasContent &amp;&amp; s.data ) || null );</code></p>

<p>All the js files are present in the webcontent itself and it works fine if the datasource is a string array.</p>

<p>This is the code,</p>

<pre><code>&lt;script type="text/javascript" src="jquery-1.7.2.js"&gt;&lt;/script&gt;`
    &lt;script type="text/javascript" src="jquery.ui.core.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="jquery.ui.widget.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="jquery.ui.position.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="jquery.ui.autocomplete.js"&gt;&lt;/script&gt;
    &lt;link rel="stylesheet" href="demos.css"&gt;
&lt;SCRIPT&gt;
    $(function() {
        function log( message ) {
            $( "&lt;div/&gt;" ).text( message ).prependTo( "#log" );
            $( "#log" ).scrollTop( 0 );
        }

        $("#autotextsearch").autocomplete({
            source: function( request, response ) {
            $.ajax({
            url: 'http://localhost:8080/solr/terms
terms=true&amp;terms.fl=ParseText&amp;terms.prefix='+request.term+'&amp;wt=json',
             dataType: "json", 
             type: "POST", 
             data: { 
                style: "full", 
                    maxRows: 5,
                name_startsWith: request.term 
             }, 
             success: function( data ) {
                 response( $.map( data.terms.ParseText, function( item ) { 
                    return { 
                label: item,
                value: item
                    }; 
                }));
            }
          }); 
         },
        minLength: 2,
        select: function( event, ui ) {
                log( ui.item ?
                    "Selected: " + ui.item + " aka " + ui.item :
                    "Nothing selected, input was " + this.id );
            }
        });
    });
    &lt;/SCRIPT&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;f:view&gt;
&lt;div class="demo"&gt;

&lt;div class="ui-widget"&gt;
    &lt;label for="autotextsearch"&gt;Type to search from solr :  &lt;/label&gt;
    &lt;input id="autotextsearch" type="text"/&gt;
&lt;/div&gt;

&lt;div class="ui-widget" style="margin-top:2em; font-family:Arial"&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;
    Result:
    &lt;div id="log" style="height: 200px; width: 300px; overflow: auto;" class="ui-widget-content"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/f:view&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
