wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes is print preview possible Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "is print preview possible" Watch "is print preview possible" New topic
Author

is print preview possible

DeAlton Jones
Greenhorn

Joined: Apr 04, 2006
Posts: 22
I have been doing research into a click event open up print preview in IE. Has
anyone had success in doing this.

Any help is greatly appreciated.

Thanks

DeAlton

Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
It would probably be an activeX control to do that in IE.

Eric
DeAlton Jones
Greenhorn

Joined: Apr 04, 2006
Posts: 22
Thanks!
Vamsi Chada
Greenhorn

Joined: Aug 12, 2004
Posts: 10
var OLECMDID = 7;
/* OLECMDID values:
* 6 - print * 7 - print preview * 1 - open window * 4 - Save As
*/
var PROMPT = 1; // 2 DONTPROMPTUSER
var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
WebBrowser1.ExecWB(OLECMDID, PROMPT);
WebBrowser1.outerHTML = "";
//window.PrintArea.innerHTML = "<div class='formlabel'>Please Click the X on the window to close!</div>"
//window.close();
DeAlton Jones
Greenhorn

Joined: Apr 04, 2006
Posts: 22
thank you very much!!

That worked Great!!
 
wood burning stoves
 
subject: is print preview possible
 
Similar Threads
JTextPane
WA #1.....word association
Print Jsf datatable issue
Printing in Java
how to give print option to any page?