Jump to content

Report Bug in _IEDocInsertHTML


Go to solution Solved by herosdei,

Recommended Posts

Posted

Using function _IEDocInsertHTML  with autoit 3.2 and internet explorer 9 give back the following message:

$_IEStatus_InvalidObjectType, Expected document element.

Looking at IE.au3 you can see a if block:

If Not __IEIsObjType($o_object, "browserdom")  Or __IEIsObjType($o_object, "documentcontainer") Or __IEIsObjType($o_object, "document") Then
        __IEConsoleWriteError("Error", "_IEDocInsertHTML", "$_IEStatus_InvalidObjectType", "Expected document element")
        Return SetError($_IEStatus_InvalidObjectType, 1, 0)
EndIf

 

If you limit the control to __IEIsObjType($o_object, "browserdom") the function works, so probably something goes wrong with the evaluation. You can easily reproduce the problem with the following code:

#include <IE.au3>

Local $oIE = _IECreate("http://www.autoitscript.com")

Local $oBody = _IETagNameGetCollection($oIE, "body", 0)

_IEDocInsertHTML($oBody, "<h2><font color=red>This HTML is inserted After Begin</font></h2>", "afterbegin") _IEDocInsertHTML($oBody, "<h2><font color=red>This HTML is inserted Before End</font></h2>", "beforeend")

 

Hope this Helps.

Heros

 

  • Moderators
Posted

herosdei,

If you are using a version as outdated as 3.2 (the final 3.2.12.1 release was over 5 years ago) then you will not get a lot of sympathy - nor understanding as I doubt anyone here (except perhaps Zedna) runs anything that old. I suggest you update and see if the problem still exists. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

  • Solution
Posted

You are right guys, probably I was using a very old autoit version (dont know why, but that's my problem)

Thank you for your ansswer in any case.

Bye,

Heros

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
  • Recently Browsing   0 members

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