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
FPHTMLDialog FPHTMLDivPosition FPHTMLFrameBase FPHTMLImageElementFactory |
FPHTMLLinkElement
FPHTMLNoShowElement FPHTMLOptionButtonElement FPHTMLOptionElementFactory FPHTMLPhraseElement FPHTMLSpanFlow FPHTMLTableSection FPHTMLUnknownElement |
IHTML Programming Elements | |
---|---|
IHTMLAreasCollection IHTMLBaseElement IHTMLControlElement IHTMLDatabinding IHTMLElement IHTMLEmbedElement |
IHTMLFrameElement
IHTMLFrameSetElement IHTMLImgElement IHTMLRuleStyle IHTMLStyleSheetRule IHTMLStyleSheetRulesCollection IHTMLTextContainer |
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