permaculture playing cards*
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 Murach's Java Servlets and JSP this week in the Servlets 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
Print Preview using Javascript doubt
ActiveX error in printpreview JS