Good day to all.
I have a page that includes an iframe. In that iframe I have a script with function called test(). I need to access the function from the parent window. After asking around I got to this solution:
<div onclick="document.getElementById('targetFrame').contentWindow.teste();">Test</div>
On click the test function should be run. The problem is that I get " Permission denied to access property test" error.
It looked like a permission error to me so I changed the file loaded in iframe permissions to 777, but without any result.
Note: The file loaded in iframe is not on the same domain.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…