Jump to content

Iterate through doc- table and retrieve data from table content


Recommended Posts

The requested action with this object has failed.:
Return SetError($_IESTATUS_Success, $oObject.document.GetElementsByTagName("table").length, $oObject.document.GetElementsByTagName("table"))
Return SetError($_IESTATUS_Success, $oObject.document^ ERROR

 

I get this error when i use _ieTableGetCollection not for all the cases...... need help on this one very urgently....help me on this please thank you:) 

Link to comment
Share on other sites

  • Developers
12 minutes ago, Sivagami said:

need help on this one very urgently....help me on this please thank you:

Something on fire? ;)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Thank you for the quick responce 

Func GetLocalTable(ByRef $oIE, ByRef $TabNO)

    If IsInt($TabNO) Then

        Local $oformA = _IEFormGetCollection($oIE)
        For $oformC In $oformA
            Local $oQuery = _IETableGetCollection($oIE, -1)
            Local $iNumQryC = @extended

            For $i = 0 To ($iNumQryC - 1)
                If $i = $TabNO Then

                    $newElement = _IETableGetCollection($oformC, $i)

                    Return $newElement
                    ExitLoop
                EndIf

            Next
        Next

    EndFunc   ;==>GetLocalTable

 

for security reasons i cant share any more details

ill call this function to get data from a webpage (normal html page and the form build with tables) by passing the table index.

i get this error at _IETableGetCollection but not all the time.

Is the information provided enough??

 

Thank you

 

 

Edited by Jos
added codebox
Link to comment
Share on other sites

  • Developers

Added a codebox around the posted code an ran it through Tidy to make it better readable, but the syntax is invalid as it is missing an EndIF

As to the issue, You need to add some error testing to the earlier _IE* functions to check whether they were successful.

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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...