Editing code in the Tag Inspector

The Tag Inspector lets you edit code in a property sheet interface that will be familiar to Visual Basic and Delphi programmers.

You can also edit tag definitions from the Tag Inspector. For details, see "Working with Tag Definitions".

Setting the display

You can select buttons at the top of the Inspector pane to control the way attributes and scripting events are displayed. There are three display options:

When dealing with cross-browser and language issues, it is helpful to select the appropriate display.

To use the Tag Inspector:

  1. Click in a tag, either in the Tag Tree or in the Editor, to see a list of its attributes.
  2. Click an attribute name to type a value or to select from a list if the attribute takes predefined values.
  3. Click outside the current field to enter the new value in your code.

Every tag that HomeSite installs includes a definition file, written in VTML, that specifies the valid attributes for that tag and the content and formatting of the tag's editor.

Creating and editing event handler script blocks

Adding and modifying script blocks for events such as onclick is easy from the Tag Inspector. You can edit an event if it is supported as an attribute of the selected tag or edit the event directly.

To add an event handler script block:

  1. Select a tag in the Tag Tree to display a list of supported attributes and events in the Tag Inspector pane.
  2. You can either click the event in the Attributes list or in the Events list.
  3. Open the drop-down list in the values column and select a script language for the event handler.
  4. In the Specify Event Handler Name dialog box, you can select the default entry or type a new name, and then click OK.

    The event syntax is added to the tag and a script block is created in the HEAD section of the document.

  5. Complete the script block for the handler.

To locate an event script block in your document, double-click its name in the Tag Inspector pane or right-click the tag and select the navigate command.