This discussion is archived
1 Reply Latest reply: Feb 25, 2013 5:11 AM by PhHein RSS

Printing in Frames

993143 Newbie
Currently Being Moderated
Hi,

I am not sure if i can post this question in this forum. I am a Java developer but this is issue is related to HTML Frames. I have three HTMLs as given below

"frame-left.html"
<html>
<head>
</head>
<script>
function myprint() {
window.parent.print();
}

</script>
<body>
<font size=20 color="red">LEFT</font><br>
<input type="button" value="My Print" onclick="myprint()"/>
</body>
</html>
"frame-right.html"
<html>
<head>
</head>
<body>
<font size=20 color="black">Right</font>
</body>
</html>
"MainPage.html"
<frameset border="0" frameborder="0" framespacing="0" cols="550,*">
<frame src="frame-left.html" name="frame1">
<frame src="frame-right.html" name="frame2">
</frameset>
In MainPage.html, I have frameset with frame-left.html in left and frame-right.html in right. I have a window.print() function in frame-left.html. When i click the "MY Print" button button. It just prints the contents in Left frame. But I need to print whole page (left and right). Please guide me to resolve this issue or if this is not the right forum, direct me to the right one. Thank you in advance

Edited by: 990140 on Feb 25, 2013 4:33 AM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points