How to access simple web service with JQuery
<p>I have this 'web service' I made that when accessed: </p>

<pre><code>"http://192.168.0.1/api/v1/search/?query=thequery"
</code></pre>

<p>returns a JSON string as the result. Its very simple it just return string.</p>

<p>I am trying to access it from my client site using JQuery:</p>

<pre><code>function doSearch() {
    $.ajax({    
        url: "http://192.168.0.1/api/v1/search/?query=" + $('#searchfield').val(),
        dataType: 'jsonp',
        success: function(json_results){
            alert('Alert title', 'Alert message!');
        },
        error: function() {
            alert('Error', 'Alert message!');
        }
    });
}
</code></pre>

<p>Although I when the web service return properly when accessed with curl or the web browser, when accessed through $.ajax it always fail, showing the Error alert message box. </p>

<p><strong>EDIT:</strong> From Firebug console I get: </p>

<pre><code>Content-Type    application/json; charset=utf-8
Content-Length  131
Connection  keep-alive
</code></pre>

<p>However, the reponse is empty.</p>
