Problem linking and printing in parent iframe

Posted by Mikersson on Stack Overflow See other posts from Stack Overflow or by Mikersson
Published on 2010-03-21T17:13:29Z Indexed on 2010/03/21 17:21 UTC
Read the original article Hit count: 515

Filed under:
|
|

I have a page with 3 iframes: Header, Pictures, and footer: The look U can see it here: http://www.pixelperu.net/iframe/iframe.jpg/iframe

<script Language="javascript">
function printfile()
{
window.frames['pictures'].focus();
window.frames['pictures'].print();
}
</script>
|
</head> 
<body>
<div id="wrapper">
<div id="header">
<iframe id="header" src="header.html" ></iframe>
</div>
<div id="content">
<iframe id="pictures" src="arm001.html" Scrolling="no"> </iframe>

</div>
<div id="footer"><iframe id="footer" src="footer.html" > </iframe></div>
</div>
</body>
</html>

The header iframe have next code:

</head>

<body>
<div id="header">
<div class="navBar">First Page | Next page | Back page | Last page | <p><input type="button" value="Print" onclick="javascript: printfile();"></p></div>

</body>

When I click on "Next Page" the content should be showed in "pictures" iframe. Also when I wanna print, it should print the "Pictures iframe"

Where shuld I put the JavaScritp? in the index page? or in the header page?

Thank you

© Stack Overflow or respective owner

Related posts about printing

Related posts about iframe