mohan@nano 0 Newbie Poster

This is my code it will work on IE alone.. i want print the content in the firefox and chorme too ... anyone one can favour me

<html>
<head>
<title>Example Report</title>
<script type="text/javascript">

function printIframe(printf){
     var clone=document.documentElement.cloneNode(true);
     var win=window.open('printf');
     win.document.replaceChild(clone, win.document.documentElement);
     win.print();

}
</script>

</head>

<body>

<p>Hi! This is IFrame Test 33</p>
<iframe width="1024" height="900" id="printf" name="printf" src="story.html"></iframe>
<a href="javascript:window.print()">Print</a> 

</body>
</html>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.