0

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

Jason McCreary
  • 71,546
  • 23
  • 135
  • 174
Linto
  • 1,234
  • 3
  • 25
  • 41

1 Answers1

3

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

Community
  • 1
  • 1
Jens Roland
  • 27,450
  • 14
  • 82
  • 104