HTML Objects in Microsoft FrontPage 2002

   

The Microsoft FrontPage object model consists of three separate object models—the Application object model, the Web object model, and the Page object model that is based on Microsoft Internet Explorer 4.0's Document object model.

In FrontPage, the objects in the Page object model are prefaced with an “FP” and take on the form "FPHTMLobject_name" or "IHTMLobject_name" while the objects in Internet Explorer have the form "HTMLobject_name" and "IHTMLobject_name". For example, if you want to reference the IHTMLDocument2 object in FrontPage, you would use “FPHTMLDocument.” Click any of the links in the following tables for more detailed information on the specified object.

Note  For more information about individual objects, consult The Microsoft Developer Network.

FPHTML Programming Elements
FPHTMLAnchorElement

FPHTMLAreaElement

FPHTMLBaseFontElement

FPHTMLBGsound

FPHTMLBlockElement

FPHTMLBody

FPHTMLButtonElement

FPHTMLCommentElement

FPHTMLDDElement

FPHTMLDialog

FPHTMLDivElement

FPHTMLDivPosition

FPHTMLDListElement

FPHTMLDocument

FPHTMLDTElement

FPHTMLEmbed

FPHTMLFieldSetElement

FPHTMLFiltersCollection

FPHTMLFontElement

FPHTMLFormElement

FPHTMLFrameBase

FPHTMLFrameElement

FPHTMLFrameSetSite

FPHTMLHeaderElement

FPHTMLHRElement

FPHTMLIFrame

FPHTMLImageElementFactory

FPHTMLImg

FPHTMLInputButtonElement

FPHTMLInputFileElement

FPHTMLInputHiddenElement

FPHTMLInputImage

FPHTMLInputTextElement

FPHTMLIsIndexElement

FPHTMLLabelElement

FPHTMLLegendElement

FPHTMLLIElement

FPHTMLLinkElement

FPHTMLListElement

FPHTMLLocation

FPHTMLMapElement

FPHTMLMarqueeElement

FPHTMLMetaElement

FPHTMLNextIdElement

FPHTMLNoShowElement

FPHTMLObjectElement

FPHTMLOListElement

FPHTMLOptionButtonElement

FPHTMLOptionElement

FPHTMLOptionElementFactory

FPHTMLParaElement

FPHTMLPhraseElement

FPHTMLScreen

FPHTMLScriptElement

FPHTMLSelectElement

FPHTMLSpanElement

FPHTMLSpanFlow

FPHTMLStyle

FPHTMLStyleElement

FPHTMLStyleSheet

FPHTMLStyleSheetsCollection

FPHTMLTable

FPHTMLTableCaption

FPHTMLTableCell

FPHTMLTableCol

FPHTMLTableRow

FPHTMLTableSection

FPHTMLTextAreaElement

FPHTMLTextElement

FPHTMLTitleElement

FPHTMLUListElement

FPHTMLUnknownElement

FPHTMLWindow2


IHTML Programming Elements
IHTMLAreasCollection

IHTMLBaseElement

IHTMLBodyElement

IHTMLButtonElement

IHTMLBRElement

IHTMLControlElement

IHTMLDatabinding

IHTMLDocument2

IHTMLElement

IHTMLElementCollection

IHTMLEmbedElement

IHTMLEventObj

IHTMLFrameElement

IHTMLFramesCollection2

IHTMLFrameSetElement

IHTMLImgElement

IHTMLRuleStyle

IHTMLSelectionObject

IHTMLStyleSheetRule

IHTMLStyleSheetRulesCollection

IHTMLTextContainer

IHTMLTxtRange

 


Other Programming Elements
DispFPHTMLDocument

IFPStyleLength

IFPStyleState

IFrontPageHostedControl2


Note  The FrontPage Page Object Model Help refers to objects, methods, properties and events that are defined in the Internet Explorer 4.0 dynamic HTML Help file (HTMLRef.chm). The examples and remarks given in this Help file were originally created for use with the JavaScript programming language. There are some differences between the JavaScript language and Microsoft Visual Basic. For example, HTMLRef.chm mentions checking for NULL when a property or method returns an object that does not exist. This is incorrect for Visual Basic. In the Visual Basic Language, the type Nothing is returned in this case. Visual Basic users can check an object for Nothing by using the Is keyword.

For example, 

If MyObject Is Nothing Then

Also, many of the examples are given in JavaScript instead of Visual Basic. JavaScript is similar to the C++ language in structure and format.

The following is an example ofJavaScript.

var Table = document.all.tags("table").item(0);
var TableCell = table.rows(3).cells(2);
TableCell.innertext = ""
While (p != NULL)
{
    TableCell.innerText = p.tagName;
    var p = p.parentElement
    TableCell.innertext = p.tagName;
    TableCell.innertext += "+";
    TableCell.innertext += TableCell.innertext;
}

The following is the equivalent example in Visual Basic.

Sub SetText()

  Set TableCell = table.Rows(3).Cells(2)
  Set p = TableCell
  TableCell.innerText = ""
  Do While Not p Is Nothing
    TableCell.innerText = p.tagName & "+" & TableCell.innerText
    Set p = p.parentElement
  Loop

End Sub