FPHTMLBaseElement Object

FPHTMLBaseElement
Multiple objects

Represents the BASE element of an HTML document. Use the FPHTMLBaseElement object to specify the base URL for all relative URLs in a Web page. You can also use the FPHTMLBaseElement object to specify the base target window for all hyperlinks that do not specify a target window. See also the IHTMLBaseElement object.

Using the FPHTMLBaseElement object

Use the Item method to return an FPHTMLBaseElement object. The following example takes an FPHTMLDocument object and a String that represents the target window all hyperlinks in the document will use unless otherwise specified.

Function SetBaseTarget(objDoc As FPHTMLDocument, _
        strTarget As String) As FPHTMLBaseElement
    Dim objHead As IHTMLElement
    
    If objDoc.all.tags("base").Length <= 0 Then
        Set objHead = objDoc.all.tags("head").Item(0)
        objHead.insertAdjacentHTML "beforeend", "<Base id=""basetarget"">"
        
        Set SetBaseTarget = objHead.all.tags("base").Item("basetarget")
    Else
        Set SetBaseTarget = objHead.all.tags("base").Item(0)
    End If
    
    SetBaseTarget.target = strTarget
End Function

Use the following example to call the preceding function.

Sub CallSetBaseTarget()
    Call SetBaseTarget(ActiveDocument, "_blank")
End Sub

Properties | all Property | children Property | className Property | Document Property | filters Property | href Property | id Property | innerHTML Property | innerText Property | isTextEdit Property | lang Property | language Property | offsetHeight Property | offsetLeft Property | offsetParent Property | offsetTop Property | offsetWidth Property | onafterupdate Property | onbeforeupdate Property | onclick Property | ondataavailable Property | ondatasetchanged Property | ondatasetcomplete Property | ondblclick Property | ondragstart Property | onerrorupdate Property | onfilterchange 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 | recordNumber Property | sourceIndex Property | style Property | tagName Property | target Property | title Property

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

Parent Objects

Child Objects | IHTMLElement Object | IHTMLFiltersCollection Object | IHTMLStyle Object