Javascript execution in iFrame from parent

Just a head. I am half noise in JavaScript.

So, for the last two days I have been googleing and for life I can’t understand how to execute a function in an iframe from the parent page. The page in the iframe is in a different domain, and the executable code is usually executed by reference, but I want it to be executed without clicking users on the link.

Hope this made some sense. If you guys would like to see what I have, just let me know, but I don’t think it would be very useful, since it does not work at all.

+1
source share
3 answers

AFAIK, JavaScript - ( Mozilla).

: Yahoo! , , , , .

google " " , - .

+4

? .

+1

https://developer.mozilla.org/en/Same_origin_policy_for_JavaScript .

There is one exception to the same initial rule. A script can set the value of document.domain for the suffix of the current domain. If this happens, a shorter domain is used for subsequent verification of origin. For example, suppose the script in the document http://store.company.com/dir/other.html executes the following statement:

There are other ways of exchanging frames that do not blur the boundaries of the domain, such as http://ajaxian.com/archives/crossframe-a-safe-communication-mechanism-across-documents-and-across-domains .

0
source

All Articles