I have a window in which I am loading an iframe.
The location of the window is
"http://localhost/current/test.html"
and the location of the iframe is
"http://localhost/current/testFrame.html"
And a script in my test.html is trying to access a function which is present in the scope of iframe window. But it is giving Permission Denied.
For eg From my main window I am executing this line of script
$("iframe")[0].contentWindow.getState(); //Permission Denied
And i am trying to access that function when the iframe is completely loaded.
How can the parent window access the function of iframe as both windows are in the same origin.