jquery - Possible to give Ajax Permission to site not in Same Origin? -


i'm trying take p - example - element 1 of websites on server 1
, insert inside <div id="insert"></div> element website on server 2

i'm trying using load function
$( '#insert' ).load('server1.com/index #take p')

issue is: enter image description here

since have access both servers, there anyway allow these request happen?

what looking cross origin http request. can read here.

you may able accomplish want adding following .htaccess file:

<ifmodule mod_headers.c>     header set access-control-allow-origin: http://example.com </ifmodule> 

but read through link more details.


Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -