开发者

Using http based IFRAME in https URL

I have php application in https mode. And the parent(https) contains an iframe. The iframe src will be a http file. The parent and the iframe are in the same domain. But i am not able to access the iframe source开发者_开发问答 using http.

Is there any way in to fix this issue using php or javascript?

Thanks in advance.


Since you tagged this javascript, I assume you mean to access the iframe source using javascript.

Because of the same origin policy in your browser, pages can communicate across different windows or iframes only when their protocols (http vs. https), port, and domain are the same.

Since your protocols are different (http vs. https) you cannot use javascript in your page to access the document in the iframe.

Here is more info about same origin policy: https://developer.mozilla.org/En/Same_origin_policy_for_JavaScript

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜