user1787687
user1787687

Reputation: 326

jquery.load() not working in IE while loading html file from another port

Code

$('.form').load('http://'+window.location.hostname+':8423/html/form/form_generate.html/?session='+session);

Is there any work around for this?

Upvotes: 0

Views: 194

Answers (2)

user1787687
user1787687

Reputation: 326

Ok. The problem seems to be a bug in jquery. We should add $.support.cors = true; to make cross domain requests work.

Upvotes: 1

Kevkong
Kevkong

Reputation: 460

As far as I know: Even another port is considered cross origin request. There are two quick workarounds coming into my mind right now:

  1. Try to host both websites under the same port
  2. Using JsonP to get the content cross origin

There was another way to allow cross origin access by alternate the settings of the webserver, but not sure how to do this excactly.

Upvotes: 0

Related Questions