File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes call function through window reference javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "call function through window reference javascript" Watch "call function through window reference javascript" New topic

call function through window reference javascript

ssl vijay

Joined: Sep 03, 2001
Posts: 4
hai friends,
i have one function ieExecWB. when i call this function window.ieExecWB(6,-1) it will print the current window content fine. but it try with
var a=open("some file(ie.,pdf file)",'winname');
a.ieExecWB(6,-1); javascript error is coming
ie., object does not support this property or method.
please give the necessary advice for print the child window content(which is pdf/text file)
the function is below,
function ieExecWB( intOLEcmd, intOLEparam )
// Create OLE Object
var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
// Place Object on page
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
// if intOLEparam is not defined, set it
if ( ( ! intOLEparam ) | | ( intOLEparam < -1 ) | | (
intOLEparam > 1 ) )
intOLEparam = 1;
// Execute Object
WebBrowser1.ExecWB( intOLEcmd, intOLEparam );
// Destroy Object
WebBrowser1.outerHTML = "";
I agree. Here's the link:
subject: call function through window reference javascript
Similar Threads
is print preview possible
ActiveX error in printpreview JS
Print Preview using Javascript doubt