Subject: Print Page
Posted By: qazi_nomi Post Date: 10/22/2004 2:23:20 AM
I have a page in ASP which has some buttons like Print and Back. This page is in printable format. But the problem is that I want to remove that buttons from print that is when page is printed there is no button display on the page
If any one has the idea that how can I do this ?
Please tel me I wil be great full to him

(*_*)

Numan
--------------------------------------------------
It is not important what you get But important is  how you got it
Reply By: mat41 Reply Date: 10/22/2004 3:28:08 AM
Try

<input type="button" onclick="print();this.style.display='none'" value="Print">

You can also do this in CSS - I forget how, something like:

print {display:none;}

Wind is your friend
Matt
Reply By: qazi_nomi Reply Date: 10/22/2004 4:27:20 AM
Dear Matt I works.but in the following way like

onClick=" this.style.display='none'; Submit.style.display='none'; print(); "

But the problem is that after printing the page the Submit button is also hide how can I show it after printing the page?


(*_*)

Numan
--------------------------------------------------
It is not important what you get But important is  how you got it
Reply By: ChrisScott Reply Date: 10/22/2004 4:37:44 AM
Hi Numan,

As Matt mentioned, you can do it with css, add the following to your page:

<style type="text/css">
@media print{
    .NoPrint{
        display: none;
    }
}
</style>

and then set the class attribute of your button to "NoPrint"

HTH,

Chris

Reply By: qazi_nomi Reply Date: 10/22/2004 5:01:16 AM
Thanks ChrisScott it is quite nicely working



(*_*)

Numan
--------------------------------------------------
It is not important what you get But important is  how you got it

Go to topic 19775

Return to index page 737
Return to index page 736
Return to index page 735
Return to index page 734
Return to index page 733
Return to index page 732
Return to index page 731
Return to index page 730
Return to index page 729
Return to index page 728