Jump to content

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"
  Endif
EndFunc
Link to comment
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]
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...