开发者

is there some way to enable cross-site javascript, either in browser or in browser embedded within java application

I am creating an application in which there will be multiple iframes within the main window- forms will be opened for submission in the main window and each form's target iframe will be one of the many iframes available...

I want to be able to access the response of each form submission, i.e. I want to access content in child iframe from code in the main window.

Please clarify the following for me-

(1) As开发者_开发知识库 I understand Same Origin Policy does not permit the above scenario? Am I correct? (2) Is there some way to enable the access to child iframe, that i require, in any web browser? I saw some posts on SO about this, and even tried some of the solutions, but nothing works (I tried Google Chrome, Firefox 6, Firefox 3.6 and Safari). (3) In case its not possible to get such data access in browser, then can I get such access by embedding a browser component in my java desktop app? In such case which browser component do you recommend?


  1. Only if the content of the child iframes is loaded from another domain.
  2. Generally not. In some newer browsers, the target domain can use HTTP Access Control headers to allow cross-site requests to be made to it, but there is no way for the source site to make that decision.
  3. I'm not familiar with Java browser components, so I'll let someone else answer this part.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜