User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 397,816 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,596 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 1627 | Replies: 2
Reply
Join Date: Sep 2006
Location: Broken Arrow, OK
Posts: 31
Reputation: okparrothead is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
okparrothead's Avatar
okparrothead okparrothead is offline Offline
Light Poster

Question Multiple Print Style Sheets -- Same Page

  #1  
May 15th, 2007
Hello DaniWeb Experts

I haven't found this topic in the forums, so if its been covered, please redirect me. Thanks

I have a page which has a div with product instructions at the bottom.

Is there a way to create a print button that will cause only the instruction sheet to print, not the whole page, with the style I want?

I could just set the print style for this page to print the instruction sheet only, but I don't necessarily want to disable printing the whole page.

Am I asking in the right forum?

Thanks for any help you can give me.
"I am always doing things I can't do, that's how I get to do them" -- Pablo Picasso
------------------------------
Tulsa Web Results
http://tulsawebresults.com
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2007
Posts: 20
Reputation: smalldog is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
smalldog smalldog is offline Offline
Newbie Poster

Re: Multiple Print Style Sheets -- Same Page

  #2  
May 15th, 2007
Hi Parrot ,

you can try this code, but I don't know if that will work Just place everything on the page to "hide" div and instruction section place to print div.

<style media="print">
.hide {display:none}
.print {display:block;}
</style>

<script>
function Print()
{
  document.getElementById('hide').className = 'hide';
  window.print();
}
</script>

<body>
<div id="hide">
Page Content........................
</div>
<div id="print">
<input type="button" onclick="Print();" value="Print">
</div>
</body>
Last edited by smalldog : May 15th, 2007 at 12:34 pm.
Join a forum for webmasters and developers
HTML Forum
Reply With Quote  
Join Date: Sep 2006
Location: Broken Arrow, OK
Posts: 31
Reputation: okparrothead is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
okparrothead's Avatar
okparrothead okparrothead is offline Offline
Light Poster

Re: Multiple Print Style Sheets -- Same Page

  #3  
May 15th, 2007
Thanks Smalldog,
I see what you're getting at.

I already have a print style sheet. Will this effect how the present style sheet works?
Last edited by okparrothead : May 15th, 2007 at 3:28 pm.
"I am always doing things I can't do, that's how I get to do them" -- Pablo Picasso
------------------------------
Tulsa Web Results
http://tulsawebresults.com
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb HTML and CSS Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the HTML and CSS Forum

All times are GMT -4. The time now is 6:37 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC