Linto
Linto

Reputation: 1282

How to make 'Jquery autocomplete' to work in cross domain

i am using the jquery auto complete script like this

$("#ac1").autocomplete('search.php');

And it is working (ie i keep the 'search.php' in local machine)

But when i place 'search.php' file in another server (say test.com).

and change the script as

$("#ac1").autocomplete('http://www.test.com/search.php');

it is not working

Can any one help me to get it work

Upvotes: 0

Views: 4196

Answers (1)

Jens Roland
Jens Roland

Reputation: 27770

The short answer is you should use JSON-P. The slightly longer answer is here: jQuery autocomplete - xml cross site request

Upvotes: 3

Related Questions