Adding a var to the url won't work! AJAX/ JQUERY
<p>Here's the following code</p>

<pre><code>$(document).ready(function(){
          var abcd= Computing;
   var req=$.ajax({
        url: "http://api.lmiforall.org.uk/api/v1/soc/search?q="+abcd,
        dataType:"jsonp"

    });

req.done(function(data){
    console.log(data);
    var unorderedList =$("&lt;ul /&gt;", {
        "id" : "titles"
    });
    var displayDetails =$("&lt;div /&gt;" ,{
        "id" : "details"
    });


    var arrayL = data.length;
    var outputString ='';

        for(var i=0; i&lt;arrayL; i++){

            outputString= data[i].title;
            var listItem = $("&lt;li /&gt;", {
                id:i,
                text: outputString
            });
            unorderedList
            .append(listItem);
        }
        $("body")
        .append(unorderedList)
        .append(displayDetails);
        $("body").on("click", "li", function(){
            var i = parseInt(this.id);
            $("#details").html(function(){
                return data[i].description;
            });
        });
});
});
</code></pre>

<p>If I replace the variable abcd with Computing into the URL, voila it will work. 
I'm trying to store in that variable inputs from my HTML page, which is basically a search engine. The user's input needs to appear in that abcd variable, not sure if I need to echo that or not. anyone pls help?</p>

<p>Thanks </p>