Forum Stats

  • 3,757,500 Users
  • 2,251,238 Discussions
  • 7,869,845 Comments

Discussions

Printing in Frames

993143
993143 Member Posts: 1
edited Feb 25, 2013 8:11AM in New To Java
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

Answers

This discussion has been closed.