ContainerHTMLTag_Index

Returns location of the tag that enclosing the location provided inside HTML Block.
Similar to ContainerHTMLTag, except this will return the index of start of that tag inside HTML Block provided.

CodeFunctionName
What is this?

Public

Tested

Original Work
Function ContainerHTMLTag_Index(LocationIndex, inHTMLBlock)
    ' Returns the index of tag of the container, without < or >
    ' Like a, img, div, table, tr, td, etc.
    ' Needs the LocationIndex that will be searched in inHTMLBlock
    '
    Rett = 0
    If LocationIndex > Len(inHTMLBlock) Then GoTo ByeBye
    If LocationIndex < 0 Then GoTo ByeBye
    For I = LocationIndex To 0 Step -1
        If Mid(inHTMLBlock, I, 1) = " <" Then
            Rett = I ' Mid(inHTMLBlock, I + 1, NextSpace - I - 1)
            Exit For
        End If
    Next
ByeBye:
    ContainerHTMLTag_Index = Rett
End Function

LocationIndex, inHTMLBlock

Views 147

Downloads 99

CodeID
DB ID