Hai,
Thanks for giving reply in soon. The code below is downloaded
from the website given by you.But I am little bit confused in the code
because there is no such statement as "window.print" in the following
script.
<script language="JavaScript"><!--
var printing = false;
if (document.layers && (self.innerHeight == 0 && self.innerWidth == 0))
printing = true;
//--></script>
<form>
<input type="text">
<script language="JavaScript"><!--
if (!printing)
document.write('<input type="button" value="Click Me"
onClick="alert(\'Hello World\')">
//--></script>
</form>
Bye & Regards,
S.Arun Srinivasan
On Tue, 7 May 2002, Shaun Steckley wrote:
> Here is a netscape solution...
>
> http://developer.irt.org/script/1132.htm
>
> In IE (not sure about Netscape), you should be able to resize the buttons
> when the print button is clicked, then change back when printing is done...
>
> -----Original Message-----
> From: S.Arun Srinivasan [mailto:arun@o...]
> Sent: Monday, May 06, 2002 7:21 AM
> To: JavaScript HowTo
> Subject: [javascript_howto] How to take print without buttons
>
>
> Hai,
>
> I have the following document (screen) which when invoked with
> "Print" button gets printed in printer.
>
> My problem is that it gets printed also with buttons such as "Change"
> and "Print" which is at the end of the document.
>
> My question is that whether we could get printed without buttons.
>
> +---------------------------------------------------------------+
> | CHANGE SUBSCRIBER PASSWORD |
> |---------------------------------------------------------------|
> | +-----------------------+ |
> | UserID | | \/ | |
> | +-----------------------+ |
> | +-----------------------+ |
> | New Password | | |
> | +-----------------------+ |
> | +-----------------------+ |
> | Retype Password | | |
> | +-----------------------+ |
> | |
> | +--------------+ +--------------+ |
> | | Change | | Print | |
> | +--------------+ +--------------+ |
> | |
> +---------------------------------------------------------------+
>
> Bye & Regards,
> S.Arun Srinivasan
>