Now that you understand basic HTML, it's time to see how it can be applied to Domino Designer. You can add HTML to a number of objects, such as hotspots, buttons , fields, views, forms, and pages. Beginning with Release 4.5, the "hooks" for HTML in a Domino database have increased, and in R5 and now Domino 6, you can add HTML to documents, pages, forms, fields, views, and many different objects. Some of these objects, such as fields and hotspots, have an Extra Field HTML tab on the properties box.
Converting Forms, Pages, and Subforms to HTML
A great new feature in Domino 6 allows designers to convert some or all content on a page, form, or subform directly into HTML on the fly. Designers then can use the HTML Editor to make changes to the HTML source code directly. Here's how:
Figure 20.5. Converting page, form, or subform content to HTML.
Figure 20.6. Viewing the HTML pane in Domino Designer.
Importing HTML code into Domino is very easy to do. To import HTML, you must first save the document that contains the HTML code you want to import.
You can then edit the HTML code directly in the Domino HTML editor via the HTML pane (View, HTML Pane) with your page, form, or subform.
Adding HTML Head Content
Open a database in the Domino Designer and follow these instructions:
"This is my bold text"
Adding HTML Attributes to a Field
Domino provides two places for designers to attach HTML to a field: The Field Extra HTML tab on the Field properties box and the HTML Attributes field event in the Objects pane.
To add HTML attributes, using the Field properties box, follow these steps:
The maxlength value defines the length of the text content a user can enter into the field. It is generally good practice to keep the maxlength value approximately 30% larger than the size value, to enable a user to completely fill a field with text.
To add HTML attributes using the field's HTML Attributes event:
A rich-text field accepts ROWS and COLS tags to define the number of rows (height) and columns (width) that the browser displays for the field. For example, the following attribute sets the number of rows to 20 and the columns to 60 (see Figure 20.7):
Figure 20.7. The HTML attributes of text and rich-text fields can be used to control the display of the field to a Web client.
Adding the ROWS and COLS attributes to a rich-text field controls both the width ( COLS ) and the height ( ROWS ). Figure 20.8 shows the effects of setting the HTML attributes on text and rich-text fields.
Figure 20.8. Setting the HTML attributes of fields defines the way the field is displayed by the browser.
The HTML tab of the Field properties box is shown in Figure 20.8. This tab enables you to define several different aspects of an object. Table 20.5 describes each of the settings on the
Table 20.5. The
Tab of the Field Properties Box
|Class||Used to apply a class from a style sheet|
|Style||Applies a specific style to an object from a style sheet|
|Title||Used to provide a tip or a prompt to a user|
|Other||Adds other attributes (don't use quotes) for the object|
Figure 20.9. Adding text (without quotes) to the Title attribute of an object produces a floating box in Internet Explorer; note the box Rich Text Field.
The Title attribute appears to function only in Internet Explorer. It does not work in Netscape 4.51 or in the Notes browser.
You can use the Other property to add additional HTML attributes to objects. For the most part, you can get at all the HTML attributes you'll ever need, so you'll rarely use this property. In the Other field, unlike the remaining fields on this tab, you must use quotation marks and identify the attribute. The syntax is as follows :
Attribute = "value"
Attributes entered into the HTML tab are incorporated into the document when it is presented to a Web client.
Using HTML in Forms and Pages
In addition to the techniques discussed previously, there are other ways to use HTML in forms, pages, and subforms. On the Advanced tab of the Form properties box is the setting Web Access: Treat Document Contents as HTML. Pages have a similar setting for Web Access Treat Page Contents as HTML on the Page Info tab. You can click this setting for either a page or a form, and then you can add HTML to the design object.
Pass-thru HTML became much more functional in R5 and Designer 6. In R4.6, pass-thru HTML wasn't very "sticky." That is, it didn't always stay set to pass-thru HTML; if you modified a form, the setting often disappeared. Now the text you've selected for pass-thru HTML shows up with a gray background so you always know when it's set.
If you try to create an HTML document with and other form tags, Domino produces an error message: Documents treated as HTML cannot be edited .
Because Domino creates all the necessary elements to create a basic HTML documentthat is, the
Using Reserved Fields
At present, three fields are reserved for HTML: $$HTMLHead, $$Return, and HTML. $$HTMLHead is a leftover from earlier versions of Notes and Domino. This field enables you to insert tags into the HEAD of an HTML document. It is not really needed any longer because forms and pages contain the HTML Head Content event. As with the HTML Head Content event, $$HTMLHead can take all sorts of tags, such as ,
Part I. Introduction to Release 6
Whats New in Release 6?
The Release 6 Object Store
The Integrated Development Environment
Part II. Foundations of Application Design
Advanced Form Design
Using Shared Resources in Domino Applications
Using the Page Designer
Adding Framesets to Domino Applications
Automating Your Application with Agents
Part III. Programming Domino Applications
Using the Formula Language
Real-World Examples Using the Formula Language
Writing LotusScript for Domino Applications
Real-World LotusScript Examples
Writing Java for Domino Applications
Real-World Java Examples
Enhancing Domino Applications for the Web
Part IV. Advanced Design Topics
Accessing Data with XML
Accessing Data with DECS and DCRs
Security and Domino Applications
Creating Workflow Applications
Analyzing Domino Applications
Part V. Appendices
Appendix A. HTML Reference
Appendix B. Domino URL Reference