The code is same on both Web server
and local server
but using firebug I get two kinds of response links:
Works fine
GET http://localhost/www.test.co.uk/index.php/home_Controller/getSearch/r
"NetworkError: 404 Not Found
GET http://www.test.co.uk/index.php/home_Controller/getSearch/r"
And this is my JS:
$(document).ready(function(){
$('#performsearch').keyup(function(e){
//if key is enter stop search
if(e.which == 13)
{
e.preventDefault();
}
var searched = $('#performsearch').val()
var fullurl = $('#hiddenurl').val() + 'index.php/home_Controller/getSearch/' + searched
$.getJSON(fullurl,function(result){
var elements = [];
$.each(result,function(i,val){
elements.push(val.title)
})
$('#performsearch').autocomplete({
source : elements
})
})
})
})