The IFRAME is described earlier, and cross-domain requests are also introduced, which is not covered here.
Today in the actual business encountered a phenomenon, an ERP management system, used to upload pictures and iframe access to other domain names, upload images used to ajaxfileupload, and this upload image control itself has an IFRAME, This means that there are 2 iframe in a page, which causes me to upload a picture to return the results of the operation without any results, such as
Methods for foreground access calls
$.ajaxfileupload ({ url : ' Http://*******.com/active/addimg.action ', // needs to be linked to server address secureuri : false, fileElementId : ' Imgfile ', // the id attribute of the file selection box cache :false, dataType: ' json ',//return value type General set to json success : function (Result,status) { } })
Background Receive and return
Result result= activeservice.addimg (Getimgfile (), Getimgfilefilename ());p rint (Result.resultjson ());
No matter how many times the call can not return the results, after the Internet query reason, only to know that in multiple IFrame, the return of the results of the Domian need to specify, and later in the return of the results written
Result result= activeservice.addimg (Getimgfile (), Getimgfilefilename ());p rint ("<script>document.domain = ' * * * * . com ';</script> ' +result.resultjson ());
The results will be displayed normally!!!
This article from "Loyalty" blog, declined reprint!
An issue where multiple IFrame cannot find results on a page