iframe - Unsafe JavaScript attempt to access frame with URL -
i getting below error when try set hash value parent url iframe contains domain url:
unsafe javascript attempt access frame url "url1" frame url "url2". domains, protocols , ports must match.
how can fix problem?
from child document of different origin not allowed access top window's location.hash
property, allowed set location
property itself.
this means given top windows location http://example.com/page/
, instead of doing
parent.location.hash = "#foobar";
you need know parents location , do
parent.location = "http://example.com/page/#foobar";
since resource not navigated work expected, changing hash part of url.
if using cross-domain communication, recommend using easyxdm instead.
Comments
Post a Comment