Share via


FPHTMLAreaElement Object

FPHTMLAreaElement
Multiple objects

Represents an AREA element. AREA elements are contained within MAP elements in an HTML document. Use the FPHTMLAreaElement object to specify the coordinates and shape of an AREA element as well as other attributes of an AREA element. See also the IHTMLAreaElement object.

Using the FPHTMLAreaElement object

Use the areas property of an FPHTMLMapElement or IHTMLMapElement object to return the IHTMLAreasCollection object of a MAP element. Use the item method to return an FPHTMLAreaElement object. The following example returns a string array containing the values of the href property, which is equivalent to a hyperlink, for all the FPHTMLAreaElement objects in the specified FPHTMLMapElement object.

Function GetAreaHREF(objMap As FPHTMLMapElement) As String()
    Dim objArea As FPHTMLAreaElement
    Dim strAreas() As String
    Dim intCount As Integer

    ReDim strAreas(objMap.areas.Length - 1)

    For intCount = 0 To objMap.areas.Length - 1
        Set objArea = objMap.areas.Item(intCount)
        strAreas(intCount) = objArea.href
    Next

    GetAreaHREF = strAreas
End Function

Use the href, Shape, and coords properties to specify the appearance and behavior of an AREA element. The following example takes arguments that specify the shape, hyperlink behavior, and coordinates of the specified FPHTMLAreaElement object.

Sub SetArea(objArea As FPHTMLAreaElement, iX1 As Integer, _
        iY1 As Integer, iX2 As Integer, iY2 As Integer, _
        strHREF As String, strShape As String)
    Dim strCoords As String
    
    strCoords = iX1 & "," & iY1 & "," & iX2 & "," & iY2
    
    With objArea
        .href = strHREF
        .Shape = strShape
        .coords = strCoords
    End With
End Sub

Properties | all Property | alt Property | children Property | className Property | coords Property | Document Property | filters Property | hash Property | host Property | hostname Property | href Property | id Property | innerHTML Property | innerText Property | isTextEdit Property | lang Property | language Property | noHref Property | offsetHeight Property | offsetLeft Property | offsetParent Property | offsetTop Property | offsetWidth Property | onafterupdate Property | onbeforeupdate Property | onblur Property | onclick Property | ondataavailable Property | ondatasetchanged Property | ondatasetcomplete Property | ondblclick Property | ondragstart Property | onerrorupdate Property | onfilterchange Property | onfocus Property | onhelp Property | onkeydown Property | onkeypress Property | onkeyup Property | onmousedown Property | onmousemove Property | onmouseout Property | onmouseover Property | onmouseup Property | onrowenter Property | onrowexit Property | onselectstart Property | outerHTML Property | outerText Property | parentElement Property | parentTextEdit Property | pathname Property | port Property | protocol Property | recordNumber Property | search Property | shape Property | sourceIndex Property | style Property | tabIndex Property | tagName Property | target Property | title Property

Methods | blur Method | click Method | contains Method | focus Method | getAttribute Method | insertAdjacentHTML Method | insertAdjacentText Method | removeAttribute Method | scrollIntoView Method | setAttribute Method | toString Method

Events | onafterupdate Event | onbeforeupdate Property | onblur Event | onclick Event | ondataavailable Event | ondatasetchanged Event | ondatasetcomplete Event | ondblclick Event | ondragstart Event | onerrorupdate Event | onfilterchange Event | onfocus Event | onhelp Event | onkeydown Property | onkeypress Event | onkeyup Event | onmousedown Event | onmousemove Event | onmouseout Event | onmouseover Event | onmouseup Event | onrowenter Event | onrowexit Event | onselectstart Event

Parent Objects

Child Objects | IHTMLElement Object | IHTMLFiltersCollection Object | IHTMLStyle Object