JQuery autocomplete using php and cross site problem

I am trying to load a series of cities / countries into a text box for display using jquery autocomplete. To do this, I add autocomplete to the text box and call a PHP procedure called SEARCH.php. This works great if SEARCH is on the same server.

When I try to call a search from another server (in this case, an ASP server), I get a javascript PERMISSION DENIED error, I think, due to a problem with the cross-site script. The problem is caused by the line

xhr.open (type, s.url, s.async);

in jquery1.3.2

Is there any solution for this?

Thanks for any help

+3
source share
2 answers

- script script, .

+1

, PHP ASP- () - , , , Javascript.

, Javascript ( ). , Cross-Origin, HTML5:
http://www.w3.org/TR/access-control/

:

+3

Source: https://habr.com/ru/post/1736189/


All Articles