JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 8th, 2001, 06:36 PM
thedanmichael thedanmichael is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 25 thedanmichael User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
printing a piece of a page with javascript--is it possible?

Well is it possible to have a button that prints part of a page? how about in landscape mode?

Reply With Quote
  #2  
Old August 8th, 2001, 08:47 PM
pieux pieux is offline
Seņor Member
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Aug 2000
Posts: 1,157 pieux User rank is Sergeant Major (2000 - 5000 Reputation Level)pieux User rank is Sergeant Major (2000 - 5000 Reputation Level)pieux User rank is Sergeant Major (2000 - 5000 Reputation Level)pieux User rank is Sergeant Major (2000 - 5000 Reputation Level)pieux User rank is Sergeant Major (2000 - 5000 Reputation Level)pieux User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 h 23 m 35 sec
Reputation Power: 36
I believe you can tell the browser to print (acting as if you clicked the print button) with window.print(). However, you can't specify what to print or in what mode -- it will just bring up your print dialog box. Now, if you want to be sneaky about it, you could build the page in frames, have a teensy frame without scrollbars that isn't apparent to the user, dynamically build the section you want to print in that frame, and print just that frame. However, this method probably isn't foolproof, as I believe IE gives you the option of printing the entire frameset.
__________________
Michael

Reply With Quote
  #3  
Old August 16th, 2001, 02:33 PM
glenn glenn is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Posts: 2 glenn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
MSDN seems to imply you can use print templates to print part of a document. Select the portion you want to print and set the selection property to true.

Reply With Quote
  #4  
Old August 16th, 2001, 04:07 PM
pieux pieux is offline
Seņor Member
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Aug 2000
Posts: 1,157 pieux User rank is Sergeant Major (2000 - 5000 Reputation Level)pieux User rank is Sergeant Major (2000 - 5000 Reputation Level)pieux User rank is Sergeant Major (2000 - 5000 Reputation Level)pieux User rank is Sergeant Major (2000 - 5000 Reputation Level)pieux User rank is Sergeant Major (2000 - 5000 Reputation Level)pieux User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 h 23 m 35 sec
Reputation Power: 36
Does MSDN happen to mention whether or not this is an MSIE-specific thing or is it an open standard?

Reply With Quote
  #5  
Old August 16th, 2001, 04:20 PM
glenn glenn is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Posts: 2 glenn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I would think it is something specific to IE. I don't recall reading whether this was specific to IE or not. They do however state:

Print templates first appeared in Internet Explorer 5.5, and were later improved in Internet Explorer 6.

Reply With Quote
  #6  
Old August 18th, 2001, 10:24 PM
thedanmichael thedanmichael is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 25 thedanmichael User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
thanks.

the frame idea is good, i wil try it.

what is MSDN?

Reply With Quote
  #7  
Old August 18th, 2001, 11:35 PM
Jonathon's Avatar
Jonathon Jonathon is offline
T-Shirt Tragic
Dev Shed Novice (500 - 999 posts)
 
Join Date: Mar 2001
Location: Melbourne, Australia
Posts: 886 Jonathon User rank is Major (30000 - 40000 Reputation Level)Jonathon User rank is Major (30000 - 40000 Reputation Level)Jonathon User rank is Major (30000 - 40000 Reputation Level)Jonathon User rank is Major (30000 - 40000 Reputation Level)Jonathon User rank is Major (30000 - 40000 Reputation Level)Jonathon User rank is Major (30000 - 40000 Reputation Level)Jonathon User rank is Major (30000 - 40000 Reputation Level)Jonathon User rank is Major (30000 - 40000 Reputation Level)Jonathon User rank is Major (30000 - 40000 Reputation Level)Jonathon User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 6 h 53 m 39 sec
Reputation Power: 320
Send a message via Skype to Jonathon
MSDN is "microsoft developer network"
http://msdn.microsoft.com/


You might also be interested in having a look at the printing capabilities of CSS-
http://www.blooberry.com/indexdot/c...index/print.htm

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > printing a piece of a page with javascript--is it possible?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap