?
Solved

Hiding fields in the printed HTML page

Posted on 2003-02-19
8
Medium Priority
?
205 Views
Last Modified: 2010-04-07
Hi,

     I have a page which has Print button.If user clicks print button the page will be printed.I want the page to be printed without print button.

Can any one give idea?

Thanks and Regards,
Abdul Raheem .S
0
Comment
Question by:sar05
7 Comments
 

Expert Comment

by:cvginkel
ID: 7986892
Simply remove the button from your page. Let the users print by File/Print, or rigth mouse button.

0
 

Expert Comment

by:venkat_sreedhar
ID: 7991708
cvginkel is right. you can removed the button from your page. So that users can print using menu option or right click.

Venkat
0
 
LVL 1

Expert Comment

by:webandit
ID: 7992960
Is this a button made by you?  In that case, use server side code with querystring.

ie:
<%If Request.QueryString("print") <> "yes" Then
   <a href="printme.htm?print=yes">Print</a>
<%End If%>

but if it is an internet explorer(or any browser based button for that matter) print button, then you can't.  You can only fire the event.

Good luck.

J
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Expert Comment

by:chriscaputo
ID: 7995639
Put the print button in a layer.  Once they click the button, do a hide on the layer and execute the print function.
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 200 total points
ID: 7995882
Put this in the head:

<style>
@media print{ .prtbutton {display:none; } }
</style>

Then apply the class to the button:

<input type="button" value="print" class="prtbutton">

Cd&
0
 
LVL 1

Expert Comment

by:tenacious
ID: 8059918
COBOLdinosaur has the answer and should get credit!!!  Use CSS with the @media print type...
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 9305689
This question has been classified abandoned. I will make a recommendation to the
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.

<note>
Unless it is clear to me that the question has been answered I will recommend delete.  It is possible that a Grade less than A will be given if no expert makes a case for an A grade. It is assumed that any participant not responding to this request is no longer interested in its final disposition.
</note>

If the user does not know how to close the question, the options are here:
http://www.experts-exchange.com/help/closing.jsp


Cd&

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
The purpose of this video is to demonstrate how to create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and SmallPDF.com Log…
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
Suggested Courses
Course of the Month9 days, 11 hours left to enroll

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question