Jump to content
Pkillerjd

get text in the middle of a label in html page from for attribute

Recommended Posts

i need to get the text in the middle of a label in html page from for attribute

here is my html:

<label for="item_0">1926</label>

Share this post


Link to post
Share on other sites

I usually get the collection and than with an if statement i filter the $oLink by it's value using $oLink.value now i would need something like $oLink.for

Share this post


Link to post
Share on other sites
4 hours ago, Pkillerjd said:

I usually get the collection and than with an if statement i filter the $oLink by it's value using $oLink.value now i would need something like $oLink.for

I already told you...

16 hours ago, Nine said:

.innerText will give you 1926...if this is waht you are looking for

instead of .value

Share this post


Link to post
Share on other sites

@Danp2 Why you let me resolve it ?  @FrancescoDiMuro Why do like what danp2 has said ?  And at @Pkillerjd seems you don't want to invest in searching :

Local $colLabels = _IETagNameGetCollection ($oIE,"label")
  For $oLabel in $colLabels
    MsgBox ($MB_SYSTEMMODAL,"",$oLabel.getAttribute("for") & "/" & $oLabel.innerText)
  Next

:ILA3:

Share this post


Link to post
Share on other sites
6 hours ago, Nine said:

FrancescoDiMuro Why do like what danp2 has said ?

Because it's what the OP was trying to do, but you were keep suggesting him to use the property .value, which you didn't use in your last post, so, @Danp2 were right :)


Click here to see my signature:

Spoiler

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

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

×
×
  • Create New...