Printing Frames in IE

This is a discussion on "Printing Frames in IE" within the JavaScript Forum section. This forum, and the thread "Printing Frames in IE are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack (1) Thread Tools
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old Jun 6th, 2006, 22:38
New Member
Join Date: Jun 2006
Location: Washington
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Printing Frames in IE

Script Noob Here,

I'm really not sure if this is a scripting issue or an HTML issue, but I am suspecting script or implementation of such. I am building a 2 frame page (Banner/Body) and in the banner I am linking different pages to be displayed in the body. I want to place a static "Print" button in the banner that will print the page in the body. The problem I am having is the default page for the body prints fine, but as soon as I link to another page, I get an "Error on Page" notification. Here is my stripped down script for the banner. If you need anymore information, I will be happy to provide it.

I am using IE 6.0

Any advice would be great.

Code: Select all
 
<html>
<head>
<title>Banner</title>
<script>
function framePrint(main){
parent.main.focus();
parent.main.print();
}
</script>
 
</head>
<body>
<a href="javascript:framePrint('main');">PRINT</a>
<BR>
<a target="main" href="insert any generic link here">LINK </a>
</body>
</html>
Thanks,
Rod

Last edited by osmenthe; Jun 7th, 2006 at 05:29.
Reply With Quote

  #2 (permalink)  
Old Jun 12th, 2006, 21:31
New Member
Join Date: Jun 2006
Location: Washington
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Printing Frames in IE

Maybe I need to give a more complete example.

Frames page:

Code: Select all
 
<html>
<head>
<title>New Page 1</title>
</head>
<frameset rows="23%,*">
 <frame name="top" src="frameprintmenu.htm">
 <frame name="bottom" src="http://www.yahoo.com" target="_top">
 <noframes>
 <body>
 <p>This page uses frames, but your browser doesn't support them.</p>
 </body>
 </noframes>
</frameset>
</html>
This sets up the top frame and bottom frame. In the example I use two generic pages. I have been able to get the code to print the default bottom page, but as soon as I link to the other(google) it will give an error on page.

Here is the code for the top bar:

Code: Select all
 
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>link_print</title>
<script>
function framePrint(whichFrame){
parent[whichFrame].focus();
parent[whichFrame].print();
}
</script>
</head>
<body>
<p>This page is designated as &quot;top&quot;. The page below is &quot;bottom&quot;. This is the 
Link and Print page. The test is to print the pages below.</p>
 
<table border="0" width="100%" id="table1" cellspacing="0" cellpadding="0">
 <tr>
  <td align="center"><a target="bottom" href="<A href="http://www.yahoo.com">Yahoo</a></td">http://www.yahoo.com">Yahoo</a></td>
  <td align="center"><a target="bottom" href="<A href="http://www.google.com/">Google</a></td">http://www.google.com/">Google</a></td>
  <td align="center">To Print the frame below press: <a href="javascript:framePrint('bottom');">HERE</a></td>
 </tr>
</table>
 
</body>
</html>
i could really use some advise as the examples available on the web are either written FOR rocket scientists or written BY minimalists.

Thanks
Rod
Reply With Quote
Reply

Tags
printing, frames

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.webforumz.com/javascript-forum/6782-printing-frames-in-ie.htm
Posted By For Type Date
Metacrawler - Die Metasuchmaschine. This thread Refback Mar 1st, 2007 14:43

Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing Jack Franklin Webforumz Cafe 5 Jun 13th, 2008 12:04
printing out dates riotman Classic ASP 0 May 23rd, 2006 20:47
Printing bigdavemmu Web Page Design 1 Sep 22nd, 2005 19:23
Printing Problem saud PHP Forum 3 Jul 25th, 2005 16:37
printing spinal007 Web Page Design 2 Nov 17th, 2004 13:37


All times are GMT. The time now is 05:45.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43