I am building a codeigniter site which is almost done. In my site country autosuggest is working fine. But when I am trying to acces the site with webproxy hidedoor.com, country auto suggest is not working. I really dont know whow to tackle it. I had tried unsuccesssful attempt of jsonp as well. So can you guy's help me? my json handling code is,
$(function() {
$("#ville").autocomplete({
source: function(request, response) {
$.ajax({ url: "<?php echo base_url().'autocomplete/suggestcity'; ?>",
data: { term: $("#ville").val()},
crossDomain: true,
dataType: "json",
//jsonp: 'callback',
//dataType: "html",
type: "POST",
success: function(data){
var citydetails = new Array();
for(i=0; i<data.lang.length; i++)
{
citydetails[i]=data.lang[i]+', '+data.countryname[i];
}
response(citydetails);
$(".ui-menu-item a").click(function(){
set_value($(this).html());
for(i=0; i<=citydetails.length; i++)
{
if(citydetails[i] == $(this).html()){
$("#co_num").val(data.co_num[i]);
$("#geoname_id").val(data.geoname_id[i]);
}
}
});
}
});
},
minLength: 2
});
});