jquery - Permission denied for ajax request inside an iFrame -


for many various reasons web page consist of following, ruby page www.example.com calls iframe php server (subdomain.example.com), in both parent , child there javascript instruction : document.domain="example.com";

parent page can access elements in child page, needed make parent page change height it's child , works nicely.

but problem in ajax request when following code :

$.ajaxfileupload

(

{          url:'www.example.com',          secureuri:false,          fileelementid:'image',          datatype: 'json',          success: function (data, status)          {     //code 1          },          error: function (data, status, e)          {     //code 2      alert(e);          }  } 

)

for reason execute code 2 , prompts error:

error: permission denied http://www.example.com (document.domain=http://example.com) property window.document http://www.example.com (document.domain has not been set).

even though request correctly received on browser right values (checked through firebug net feature)... , image uploaded on subdomain.example.com server.

thanks, wa'el

www.example.com , example.com 2 distinct hostnames. maybe issue xss filter triggered.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -