0
<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
        <title>Untitled Document</title>
        <script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
    </head>
    <body>
        <iframe width="640px" height="590px" id="pagefrm" src="http://support.domain.com/controller/method"></iframe>
        <script>
            $(window).load(function() {
                $("#pagefrm").contents().find("body").append("Hi");
            });
        </script>
    </body>
</html>

In above code, I am trying to append text or scripts from parent page. But when ever I use .append(), .html(), .prepend() etc. using jquery, its returning error - Error: Permission denied to access property 'document'.

Dhaval Panchal
  • 648
  • 6
  • 26
Majeed
  • 134
  • 9

0 Answers0