View Full Version : Print button not wanted on print page
puneet_4m_india
10-03-2005, 04:26 PM
Hi Team,
Please help me to reolve this issue.
User is clicking on print button to take the printout of the page.All the values coming on page are dynamic.
I want that after user takes the printout the print button should not come on the page(I mean hard copy). Please help me how to do that..
Currently I am using this code
<input type="button" value="Print" onclick="javascript:window.print()">
I am usung xsl stylesheet.
Please help.
Regards
Puneet Chhibber.
glenmac
10-03-2005, 04:43 PM
You can use CSS for this.<style media="print">
.noPrint {display:none;}
</style>Then give the button (or anything you don't want to print) the "noPrint" class
<input type = "button" class = "noPrint" value = " Print Resume " onclick = "print()">
puneet_4m_india
10-05-2005, 01:08 PM
hi glenmac,
first of all thanks for your reply.
Could you please tell what should i write in onclick()=print()
<input type = "button" class = "noPrint" value = " Print Resume " onclick= "print()">
thansk pls reply
Puneet
puneet_4m_india
10-05-2005, 01:22 PM
hi
I am able to get the desired result.Thanks a lot for your quick help. But I have now one problem due to changes. I have lost look and feel of my page on broowser after using
<style type="text/css" media="print">
as previously i was using
<style type="text/css">
My XSL was using the below code before i made changes
<xsl:text disable-output-escaping="yes">
<![CDATA[
<style type="text/css" media="print">
<!--
.INFO {
color="#008000"; font-weight:bold;
}
.Label {
font-family: Arial; color: #2F0682; font-style:italic; font-size: 10pt; font-weight:bold
}
.Data {
font-family: Arial; font-size: 10pt; font-weight:bold
}
.URLData {
font-family: Arial; font-size: small; color: #0000FF
}
.SectionTitle {
color: #FFFFFF; font-family: Arial, Helvetica, sans-serif; font-size: 10pt; text-align:left
}
.SecondTitle {
color: #FFFFFF; font-family: Arial, Helvetica, sans-serif; font-size: 12pt; text-align:left; font-weight:bold;
}
.PageTitle {
color: #FFFFFF; font-family: Univers Condensed, Helvetica, MS Sans Serif; font-size: 18pt; font-weight:bold;
}
.noPrint {display:none;}
//-->
</style>
]]></xsl:text>
Please advise
Regards
Puneet
felgall
10-05-2005, 09:27 PM
<style type="text/css">
.INFO {
color="#008000"; font-weight:bold;
}
.Label {
font-family: Arial; color: #2F0682; font-style:italic; font-size: 10pt; font-weight:bold
}
.Data {
font-family: Arial; font-size: 10pt; font-weight:bold
}
.URLData {
font-family: Arial; font-size: small; color: #0000FF
}
.SectionTitle {
color: #FFFFFF; font-family: Arial, Helvetica, sans-serif; font-size: 10pt; text-align:left
}
.SecondTitle {
color: #FFFFFF; font-family: Arial, Helvetica, sans-serif; font-size: 12pt; text-align:left; font-weight:bold;
}
.PageTitle {
color: #FFFFFF; font-family: Univers Condensed, Helvetica, MS Sans Serif; font-size: 18pt; font-weight:bold;
}
</style>
<style type="text/css" media="print">
.noPrint {display:none;}
</style>
puneet_4m_india
10-06-2005, 01:39 PM
hi Thanks a lot everything si working great but still lil problem. On my screen i as showing the my panel title and also the help fiel icon.
SO when i take i printout the help file icon is also coming which I do not want.
Please advise.
I am so sorry for bugiing you all.
I really appreiacte your help in this regards.
Thanks
Regards
Puneet
puneet_4m_india
10-07-2005, 12:42 PM
dear all,
waiting for your reply.Please advise ASAP.
Thanks
Regards
Puneet Chhibber
glenngv
10-07-2005, 02:04 PM
Do as what you did in the Print button. Put a class="noPrint" in any element you don't want to be printed.
puneet_4m_india
10-11-2005, 08:56 AM
Hi all,
Thanks a ton for your timely help.Everything is workling fine regarding the print functionality.
I would like to again take your quick help in resolving this new issue.
Request details:
I want to restrict the user from entering the numeric value upto 1 decimal point and not two.
If users enters a value from 2.0 to 2.01% it should not allow.
Value allowed by textbox should be 2.0 or 3.1 and not 2.01 or 3.01 or 3.10.
Please help ASAP.
Thanks and regards
Puneet
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.