FrontPage 98 introduced a new reserved attribute, “CLIENTSIDE”, to designate components that have no server-side expansion. Instead of expanding on the server at save-time or browse-time, a client-side component generates its expansion at edit-time when FrontPage calls the component edit() function. To accomplish client-side expansion, the component uses three other reserved attributes.
Using the “S-HTML” attribute, a client-side component can specify the exact HTML that will appear between its startspan and endspan in the final saved page. This can be combined effectively with the existing “PREVIEW” attribute to display one block of HTML while the component is viewed in the editor, and an entirely different block of HTML when viewed in the browser.
For instance, an ASP-based component might want to display a pretty version of its name and logo while the user is editing the page, but be interpreted as real ASP code once the page is browsed. If it declares itself to be a client-side component, it can use the PREVIEW attribute to specify the name and logo, and the S-HTML attribute to specify the ASP code.
Finally, with the addition of the Preview tab to FrontPage, components have a third environment in which they may want to expand differently. Using the “LOCAL_PREVIEW” attribute, a client-side component can specify distinct HTML for substitution when the user views the page from the Preview tab. In the example above, because the component ASP code won’t be interpreted before the Preview tab is rendered, the component software may try to use LOCAL_PREVIEW to insert a reasonable facsimile of its final output and/or a warning message that the preview is not wholly accurate. The "CLIENTSIDE" attribute must be specified in addition to the "LOCAL_PREVIEW" attribute to enable local preview.
The following table outlines the client-side reserved attributes:
Attribute | Meaning |
CLIENTSIDE | This attribute has no right-hand-side value. If present, it indicates that the component has no server-side expand function, and that the S-HTML, LOCAL_PREVIEW, and PREVIEW attributes should be used instead. |
S-HTML | The value of this attribute specifies the HTML to be used when the component is written to a page. |
LOCAL_PREVIEW | The value of this attribute specifies the HTML to be used when the editor is on the Preview tab. The CLIENTSIDE attribute must be specified along with the LOCAL_PREVIEW attribute to enable local preview. If the S-HTML attribute does not exist, this value is also used when saving the component to a file. |
PREVIEW | The value of this attribute specifies the HTML to be used when the editor is displaying the Normal tab. If the LOCAL_PREVIEW attribute does not exist, this is also what is used on the Preview tab. If neither the S-HTML or the LOCAL_PREVIEW attributes are present, this is also what is written to the file. |
BOTID | This attribute can be added to the BOT dictionary with a value of “”, which causes every instance of this BOT that is inserted on a particular page to be assigned a unique BOTID. A BOTID is an integer value that starts at 0 and increments by one each time a BOT of the same name and type is inserted on the page.
The “ASPVOTER” VoteBot sample demonstrates this attribute. The first ASPVOTER you insert on a page will have a BOTID=0, the second will have a BOTID=1, and so on. You can enumerate the BOTs on a page using these BOTIDs. |