•
•
•
•
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 391,626 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,743 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: 1591 | Replies: 2
![]() |
•
•
Join Date: Sep 2006
Location: Broken Arrow, OK
Posts: 31
Reputation:
Rep Power: 2
Solved Threads: 0
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 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
------------------------------
Tulsa Web Results
http://tulsawebresults.com
•
•
Join Date: May 2007
Posts: 20
Reputation:
Rep Power: 0
Solved Threads: 0
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.
,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
HTML Forum
•
•
Join Date: Sep 2006
Location: Broken Arrow, OK
Posts: 31
Reputation:
Rep Power: 2
Solved Threads: 0
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?
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
------------------------------
Tulsa Web Results
http://tulsawebresults.com
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb HTML and CSS Marketplace
- Is a Mix of XHTML Strict and Transitional Pages OK? (HTML and CSS)
- Browser client testing (Web Developers' Lounge)
- CSS syntax and commands (JavaScript / DHTML / AJAX)
- Print a web page in ASP.net (ASP.NET)
- second page error (PHP)
- How do i print asp page on client side "only the contents" (ASP)
- Style properties are ignored by Mozilla browser... (ASP.NET)
Other Threads in the HTML and CSS Forum
- Previous Thread: Add vertical scroll bar to a table
- Next Thread: onclick parent goto previous page


Linear Mode