User Guide

Editing code in the Tag Inspector 79
Creating and editing an event handler script block
You can add and modify script blocks for events such as onClick from Tag Inspector.
If the selected tag supports an event as an attribute, you can edit the event in its
attribute field. Otherwise, you can edit the event directly under the Events list.
To add an event handler script block:
1 On the Tag Inspector resources tab, in the Tag Tree pane, select a tag.
A list of the tag’s supported attributes and events, with their values, appears in
the Tag Inspector pane.
2 Click the event in the Attributes list or in the Events list.
3 In the drop-down list, select a script language for the event handler; for example,
select Create JavaScript Event.
4 In the Specify Event Handler Name dialog box, select the default entry or enter a
name, then click OK.
The event handler is added as an attribute to the tag, and a script block is created
in the
head section of the document.
5 Complete the script block for the handler.
6 Select File > Save.
To find an event handler function, do one of the following:
On the Tag Inspector tab, under Attributes or Events, double-click the event.
From a tag with an attribute for the event, right-click the event attribute; for
example, right-click
onClick=”_onclick()” in <table width=”640”
border=”0” onClick=”_onclick()”>
. Then select Navigate to <function name>
Function.
The cursor moves to the selected event handler function.