on 05-09-2009 11:16 AM
hi experts
I am printing my bsp page , button also coming in print layout. i want to hide buttons in printout
plz suggest me how to do .
thanks
Thanks Durairaj & stefan
<b>@Durairaj</b>
I am using htmlb button control so i cant define CLASS in button bcoz there is no CLASS attribute in htmlb button .
<b>@stefan</b>
I tried with ur code but i am not able to run this jscript , i tried but didnt run ,
PLZ tel me in better way
This is my button control
<htmlb:button id = "MyprintButton"
text = "Print"
tooltip = "Click here to print"
onClientClick = "javascript:window.print()"
design = "small"
width = "50" />
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
you have to define the css class like
<s t y l e type="text/css" media="print">
.noPrint{display:none}
</ s t y l e>
You can place this in your head section.
When you have to put a inline tag span around the button tag like.
<s p a n class = "noPrint">
<htmlb: button ..../>
</ s p a n >
As you may try out, the button will be not printed
Best regards, Stefan
Hi,
i assume, that you use bsp extensions. In this case the above mentioned solution must be enhanced.
Have a look at jquery (jquery.com, or google). Use this library and include it in your page, using
<htmlb:headInclude />
reference to tthe jquery script file
...
$(document).ready(function(){
$("#button_id").addClass("dontprint");
});
where button_id is the id of your button and dontprint is the class mentioned by
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use style sheet
<style type="text/css" media="print">
.dontprint{display:none}
</style>
now apply dontprint class to all your buttons which you dont want to get printed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.