This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

call function through window reference javascript

 
ssl vijay
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 = "";
}
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic