gamble Posted June 3, 2015 Posted June 3, 2015 I have an iFrame in a page, and i need to call a function that the main page has. I know about the parent.functionName(), but that isnt working for me. Keeps throwing out this error: Uncaught SecurityError: Blocked a frame with origin "null" from accessing a frame with origin "null". Protocols, domains, and ports must match. Anyone know how to fix this, or get around it in some way? I am doing this on my desktop with regular js and HTML files, not on a server or anything. Quote
sniko Posted June 3, 2015 Posted June 3, 2015 (edited) Look into Same origin policy. Note: As the policy name suggests, this will only work with iFrames with the same origin (same domain; ie: sub.domain.com and domain.com can access each others content. It won't work with domain.com and other.com) This StackOverflow thread will be of use to you :) Edited June 3, 2015 by sniko Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.