Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

is print preview possible

 
DeAlton Jones
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would probably be an activeX control to do that in IE.

Eric
 
DeAlton Jones
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks!
 
Vamsi Chada
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you very much!!

That worked Great!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic