Printing content of IFRAME

Discussion in 'HTML' started by Yann Laviolette, Jan 14, 2004.

  1. Hi!

    I have an IFRAME to link my site to Maporama. All works fine except I
    can't print. So here's my code...

    <!-- Link to start the printing -->
    <a href="#" onClick="printFrame();"><img src="images/printer.jpg" width="24" height="25" border="0"> Imprimer la carte</a>

    <!-- IFRAME that link my site to Maporama -->
    <iframe id="frame_maporama" class="maporama" name="frame_maporama" src="http://www.maporama.com/share/DriveMe.asp?SESSIONID=%7BD38E9B31-5F6E-494E-B33F-E7A77D423870%7D&COUNTRYCODE=CA&_XgoGCAddress=ch+du+rang+des+gres&_XgoGCTownName=NOTRE-DAME-DU-MONT-CARMEL&Zip=&State=QC&VN=DRIVEME&VV=drv&GO_DRIVEMETO.x=29&GO_DRIVEMETO.y=12" width="700" height="700">
    Votre navigateur ne supporte pas cette fonctionnalité.
    </iframe>

    <!-- Script to print the IFRAME -->
    <script language="JavaScript">
    function printFrame()
    {
    var pp = frames[1];
    pp.focus();
    pp.print();
    }
    </script>

    Before I use the IFRAME, I was using the window.print() method and all
    works. This function print the content of the current frame. But now I
    want to print the content of the IFRAME.

    Can somebody help me?

    Thanks

    Yann Laviolette
     
    Yann Laviolette, Jan 14, 2004
    #1
    1. Advertising

  2. Yann Laviolette

    brucie Guest

    brucie, Jan 14, 2004
    #2
    1. Advertising

  3. Yann Laviolette

    Whitecrest Guest

    In article <>,
    says...
    > I have an IFRAME to link my site to Maporama. All works fine except I
    > can't print. So here's my code...


    I entered "printing IFrame" in google and was rewarded with sample after
    sample of code to do exactly what you want.

    --
    Whitecrest Entertainment
    www.whitecrestent.com
     
    Whitecrest, Jan 14, 2004
    #3
  4. Yann Laviolette, Jan 14, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. hazz
    Replies:
    6
    Views:
    50,036
    SkyUCHC
    Jun 9, 2010
  2. Daedalous
    Replies:
    3
    Views:
    823
    Daedalous
    Jan 16, 2004
  3. nc
    Replies:
    0
    Views:
    179
  4. Printing Iframe content

    , Oct 21, 2005, in forum: Javascript
    Replies:
    1
    Views:
    245
  5. Amit
    Replies:
    0
    Views:
    223
Loading...

Share This Page