how to print the certain portion of a webpage ??

This is a discussion on "how to print the certain portion of a webpage ??" within the JavaScript Forum section. This forum, and the thread "how to print the certain portion of a webpage ?? are both part of the Program Your Website category.



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

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jul 26th, 2006, 03:01
New Member
Join Date: Jul 2006
Location: dhn
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation how to print the certain portion of a webpage ??

Hello frens and seniors of webforumz...
em back with some problem in javascript...
what i am trying to do is to print the certain portion of the page (not the whole page) using javascript but i am not getting the appropriate soln..Can anybody help me with the neccessary js code...
Anyway thanks in advance
Reply With Quote

  #2 (permalink)  
Old Jul 27th, 2006, 21:46
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
Re: how to print the certain portion of a webpage ??

If you set your css up properly, then when you go to print the document, everything other than the part you want to print will be hidden.

You need to use a seperate css file and in the link line that hooks the file into your pages, you need to set media='print'.
Reply With Quote
  #3 (permalink)  
Old Jul 31st, 2006, 19:57
Junior Member
Join Date: Jul 2006
Location: Boca Raton, FL
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to AunStudio Send a message via AIM to AunStudio Send a message via MSN to AunStudio Send a message via Yahoo to AunStudio
Re: how to print the certain portion of a webpage ??

Add this line in your CSS Stylesheet

Code: Select all
@media print { .noprint { display: none } }
Then wrap whatever you dont want to be printed with

Code: Select all
<span class=noprint> this text wont be printed </span>
That should do it

Cheers,
Bruno Aun
Reply With Quote
  #4 (permalink)  
Old Jul 31st, 2006, 22:44
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
Re: how to print the certain portion of a webpage ??

As <span> is an inline element, it is not an appropriate method for defining whole areas of a page, which is the realm of the <div> element.
Reply With Quote
Reply

Tags
print, certain, portion, webpage

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Print Without Prompt chrisgeast JavaScript Forum 2 Sep 7th, 2007 10:34
print from my website dber Web Page Design 7 Jun 24th, 2006 22:54
css - print and screen? cyberpac9 Web Page Design 0 Jan 3rd, 2006 20:45
Print ClaireB JavaScript Forum 2 Sep 9th, 2005 18:52
Echo vs Print Sqrlgrl PHP Forum 3 May 30th, 2005 22:31


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


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