Jump to content
Sign in to follow this  

Error: Object referenced outside a "With" statement.:

Recommended Posts


I am creating a embedded IE window that people will use as a safe portal into a web application and the applet will also track what is being done. The tracking works fine and that is the main part of the script. I am trying to use AdlibEnable to check if the buttons exist and if they do to disable them. I kepp getting the error Object referenced outside a "With" statement.: The latest way I tried this looks like the following: I have tried placing the AdlibEnable line at various places in the script but it never seems to work regardless.

Func GreySubmit()
  If $oIE then 
    $oIEE = _IEAttach ("Safe Portal", "embedded")
    $Sub = $oIEE.document.getElementById("FramePage").contentwindow.document.forms.Form1.R_footer_SB.disabled
    If $Sub = 0 then $oIEE.document.getElementByI("FramePage").contentwindow.document.forms.Form1.R_footer_SB.disabled="True"

Share this post

Link to post
Share on other sites

If that doesn't fix your issue, adding _IEErrorHandlerRegister() at the beginning of your script will output helpful COM information to the console.

IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.