html - Unsafe JavaScript attempt and cordova web security -
in mobile application have page iframe.
<iframe id="activityframe"></iframe>
to show iframe content run next code.
var frame = document.getelementbyid('activityframe'); var url = "ourdomen.com"; iframe.setattribute('src', url);
all iframe content loaded correctly. user can navigate between pages. on last page inside iframe "ourdomen.example" load other iframe payment form domen "secyrityservice.example". when user click submit button "secyrityservice.example" rederct on "ourdomen.com" iframe by
<script type="text/javascript"> <!-- $(function() { document.redirectform.submit(); }); //--> </script> </head> <body> <form name="redirectform" action="ourdomen.example" method="post" target="_parent"> </form>
and error in console unsafe javascript attempt initiate navigation frame url 'ourdomen.com' frame url 'serycirtyservice.example'. frame attempting navigation neither same-origin target, nor target's parent or opener.
if run chrome --disable-web-security, work correct without errors. try disable web-secrurity in cordova config
<access origin="*" /> <preference name="websecurity" value="disable" />
but didn't android , ios build. read questions unsafe javascript attempt access frame url , unsafe javascript attempt access frame url didn't help.
how can disable error in cordova or fix it? use cordova 3.4.0
thanks.
Comments
Post a Comment