print the content page using iframe in all browser

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
vijayalakshmi
Forum Newbie
Posts: 8
Joined: Tue Jan 21, 2014 10:22 pm

print the content page using iframe in all browser

Post by vijayalakshmi »

Code: Select all

<html>
<head>
<title>Example Report</title>
<script type="text/javascript">
    function myPrint() {
    window.frames.frame.focus();
    window.frames.frame.print();
    }
</script>
</head>
<body>
<p>Hi! This is IFrame Test 33</p>
<iframe width="1024" height="900" id="frame" name="frame" src="http://logpass.com/print test/story.html"></iframe>
 <a href="#" onclick="javascript:myPrint();">Print</a>
</body>
</html>
But it is not worked to all browser.... Pls suggest anyone to print the iframe content in all browser...
Post Reply