Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Printing in Frames

993143Feb 25 2013 — edited Feb 25 2013
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 25 2013
Added on Feb 25 2013
1 comment
222 views