Printing content of IFRAME

Y

Yann Laviolette

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/Drive...ME&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
 
W

Whitecrest

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.
 
Y

Yann Laviolette

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top