FindAncherURL_InHTMLRow

Finds the URL (href tag value) for an anchor inside a table row (tr element) that is passed through HTMLTr parameter.
Looping through all < td >s in passing < tr >
HTMLTr has to have full TR from < tr to < /tr>
Needs Frequency(), CutString3(), HTMLTagAttributeValue()

CodeFunctionName
What is this?

Public

Tested

Original Work
Function FindAncherURL_InHTMLRow(HTMLTr)
    ' Finds the first href for an anchor in an html row (tr)
    ' Looping through all <td >s in passing <tr >
    ' HTMLTr has to have full TR from < tr to < /tr >
    ' needs Frequency(), CutString3(), HTMLTagAttributeValue()
    Rett = ""
    ThisTDs = Frequency(HTMLTr, " <td ") ' How many columns do we have
    ColTD = 1 ' ThisTDs
    Do While ColTD <= ThisTDs
        LastTD = CutString3(HTMLTr, ColTD, " <td ")
        If VBInstr(" <a ", LastTD) > 0 Then
            Rett = HTMLTagAttributeValue(LastTD, "a", "", "", "", "href")
            Exit Do
        End If
        ColTD = ColTD + 1
    Loop
ByeBye:
    FindAncherURL_InHTMLRow = Rett
End Function

HTMLTr

Views 289

Downloads 35

CodeID
DB ID