Link to home
Start Free TrialLog in
Avatar of sar05
sar05

asked on

Hiding fields in the printed HTML page

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
Avatar of cvginkel
cvginkel

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

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

Venkat
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
Put the print button in a layer.  Once they click the button, do a hide on the layer and execute the print function.
ASKER CERTIFIED SOLUTION
Avatar of COBOLdinosaur
COBOLdinosaur
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
COBOLdinosaur has the answer and should get credit!!!  Use CSS with the @media print type...
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:
https://www.experts-exchange.com/help/closing.jsp


Cd&