Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Access denied error (Needs Print functionality)

    I want to print different domain's pages print that are opened in Iframe.
    I need some solution regarding this.
    I am not able to find any solution till now. I am getting "denied access error" .Want to get print of google.com's page.

    I created simple 3 files started.html,A.html,B.html
    *********
    started.html
    <HTML>
    <HEAD>
    <script>
    function PrintFrame()
    {
    windowrames["A"].focus();
    window.frames["A"].print();

    }
    </script>
    </HEAD>

    <BODY>

    </BODY>
    </HTML>
    <A HREF="#" onclick="PrintFrame()">Print</A>
    <IFRAME SRC="A.html" NAME="A" ></IFRAME>

    <br><br><br><br><A HREF="B.html" target=A>Click here</A>
    *************
    *************
    A.html
    <HTML>
    <BODY>
    Here i am in window A <a href=http://google.com>google</a>
    </BODY>
    </HTML>
    *************
    *************
    B.html
    <HTML>
    <BODY>
    Here i am in window B <a href=http://google.com>google</a>
    </BODY>
    </HTML>

  • #2
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by agg_rohit
    I want to print different domain's pages print that are opened in Iframe.
    can't be done. you can only access your own domain via script.
    *keep it simple (TM)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •