I have written this print using JavaScript. But that
is working only in Netscape. Can i get full working
version in both the versions (IE, NS)? I know this is
offline topic.. but i need it..sorry
Venu
--- Dean Sacramone <[EMAIL PROTECTED]> wrote:
> Okay,,, here it is........... ON your image etc...
> use this call to the
> function "return printPage()"
>
>
> <SCRIPT LANGUAGE="JavaScript">
> <!--
> var da = (document.all) ? 1 : 0;
> var pr = (window.print) ? 1 : 0;
>
>
>
> if (da && !pr)
> document.write('<OBJECT ID="WB" WIDTH="0"
> HEIGHT="0"
>
CLASSID="clsid:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>');
>
> function printPage()
>
> if(navigator.appName == "Microsoft Internet
> Explorer" &&
> (navigator.appVersion.indexOf("Mac") != -1 ||
> navigator.appVersion.indexOf("3.1") != -1)) {
> alert("Sorry, your browser doesn't support this
> feature. Please click on
> this page and then press Ctrl-P on a PC or Command-P
> on a Mac.");
> }
>
> else if (pr) // NS4, IE5
> parent.bottom2.print();
> <!-- this is the frame name where the page
> resides that you want printed -->
>
> else if (da) // IE4
> vbPrintPage()
> else // other browsers
> alert("Sorry, your browser doesn't support this
> feature. Please click
> on this page and then press Ctrl-P on a PC or
> Command-P on a Mac.");
> return false;
> }
> // -->
> </SCRIPT>
> <SCRIPT LANGUAGE="VBScript">
> <!--
>
> Sub window_onunload
> On Error Resume Next
> Set WB = nothing
> End Sub
>
> Sub vbPrintPage
> OLECMDID_PRINT = 6
> OLECMDEXECOPT_DONTPROMPTUSER = 2
> OLECMDEXECOPT_PROMPTUSER = 1
> On Error Resume Next
> WB.ExecWB OLECMDID_PRINT,
> OLECMDEXECOPT_DONTPROMPTUSER
> End Sub
> // -->
> </SCRIPT>
>
>
>
>
> Thanks,
> ~~~~~~~~~~~~~~~~~~~~~~~
> Dean Sacramone
> [EMAIL PROTECTED]
> Lead Programmer-->310-815-5091
> ~~~~~~~~~~~~~~~~~~~~~~~
> "Don't tell me how hard you work. Tell me how much
> you get done."
> -- James J. Ling
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with
> body: "signoff JSP-INTEREST".
> 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
__________________________________________________
Do You Yahoo!?
Thousands of Stores. Millions of Products. All in one Place.
http://shopping.yahoo.com/
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
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