php - JS to reload parent to iframe with two different servers -
hi having issue project.
i have 2 servers
example-internal.com example-external.com
a page on example-internal.com has iframe loads example-external.com
example-internal.com hold internal info not accessible internet network
example-external.com hold external data can accessed
the iframe opens form allows server send data out causing issues me.
what want once has posted data in iframe php outputs script reload parent not work. have tried variations of check no deal.
$auth = mysql_query("insert `table` values(........)"); if($auth){echo ' <script type="text/javascript"> self.parent.location.reload(); </script>'; } please im confuzed has worked before seams on different server wont work ideas people how can this. or because server requesting reload.
your problem due same origin policy, meaning i-frame not considered safe because different domain.
one potentially simple solution problem set document.domain on page loads in iframe "example-external.com".
such as:
<script> document.domain = "example-internal.com"; </script>
Comments
Post a Comment