Thanks a lot.
It was great.

Ricky


--- In [email protected], "Dean Fiala" <[EMAIL PROTECTED]> wrote:
>
> You've dedined a CSS class, you need to define an element with the 
#.  This
> will apply the style to any control with the ID of #PrintButton
> 
> <style type="text/css" media="screen">
> #PrintButton{
> display:block;
> }
> </style>
> <style type="text/css" media="print">
> #PrintButton{
> display:none;
> }
> </style>
> 
> 
> On 5/3/07, Ricky <[EMAIL PROTECTED]> wrote:
> >
> >
> > Hi
> >
> > I am not able to print webpage without print button. The code I 
am using
> > is not working.
> >
> > Onafterprint is not working or I am unable to do it properly. I 
have
> > tried my things but havn't got out the way out yet.
> >
> > Pls. Suggest.
> >
> > function PrintButton_onclick()
> >
> > {
> > window.print()
> > }
> > </script>
> > </head>
> >
> > <style type="text/css" media="screen">
> > .PrintButton{
> > display:block;
> > }
> > </style>
> > <style type="text/css" media="print">
> > .PrintButton{
> > display:none;
> > }
> > </style>
> >
> > <body onafterprint="window.onbeforeprint()"
> > onbeforeprint="window.onafterPrint()" >
> > <form id="form1" runat="server" language="javascript"
> > onclick="return form1_onclick()">
> >
> > <asp:Label ID="Label2" runat="server" Visible="False"
> > Width="126px"></asp:Label>
> >
> > <input id="PrintButton"
> > type="button" value="Print" language="javascript"
> > onclick="return PrintButton_onclick()" />
> >
> > [Non-text portions of this message have been removed]
> >
> >  
> >
> 
> 
> 
> -- 
> Dean Fiala
> Very Practical Software, Inc
> Now with Blogging...
> http://www.vpsw.com/blogbaby
> Microsoft MVP
> 
> 
> [Non-text portions of this message have been removed]
>


Reply via email to