开发者

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

开发者 https://www.devze.com 2023-03-29 15:18 出处:网络
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)

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.c开发者_JAVA百科om).

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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消