Jump to content
Sign in to follow this  
gimx

id and class

Recommended Posts

gimx

Hello,

I get div and tbody in webpage.

For tbody, i want to get only the tbody with class="blabla" and that work :

For $oTbody In $oTbodyBlabla
If String($oTbody.className) = "blabla" Then
(code)
EndIf

Now, i want to get div by the id but that don't work.

I use this code, what's wrong plz ?

For $oDiv In $oDivIdid
If String($oDiv.id) = "ididid" Then
(code)
EndIf

Thx :D

Edited by gimx

Share this post


Link to post
Share on other sites
DjDeep00

@gimx...

It worked for me...

$oDivIdid = _IETagNameGetCollection ($oIE, "DIV")
For $oDiv In $oDivIdid

MsgBox(4096,"",String($oDiv.id) )
Next

I would use the following example from the help file to see if there are any div in the webpage.

$oElements = _IETagNameAllGetCollection ($oIE)
For $oElement In $oElements
    MsgBox(0, "Element Info", "Tagname: " & $oElement.tagname & @CR & "innerText: " & $oElement.innerText)
Next

Share this post


Link to post
Share on other sites
gimx

Ok thx, it's a good idea, i will try :D

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  

×