Thankx sufi
it works fine
SHEKHAR AGARWAL (B.TECH)
TATA CONSULTANCY SERVICES
Email : [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Tel: 268-548-2592 (work)
262-798-1052 (home)
-----Original Message-----
From: sufi malak [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 09, 2001 12:10 PM
To: [EMAIL PROTECTED]
Subject: Re: print program in java
Hi, here is a small script in javascript, it will do what are you
looking
for.
Step 1.
Put the following script in the head of your page.
<script>
function printWindow(){
bV = parseInt(navigator.appVersion)
if (bV >= 4) window.print()
}
</script>
Step 2.
Put the following in the body of your page.
<a href="javascript:printWindow()">Print This Page</a>
Good luck
Sufi
>From: "Agarwal, Shekhar (MED, TCS America)"
<[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
> reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: print program in java
>Date: Thu, 8 Mar 2001 12:20:19 -0600
>
>hi
>i have print button in a jsp,on clicking the button i want the page to
>be printed.its functionality should be same as the print button on the
>browser.
>i want a program module written in java that can print the current
page.
>can anyone help me ???
>
>SHEKHAR AGARWAL (B.TECH)
>Email : [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>
>=======================================================================
====
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
========================================================================
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets