User Guide

372 Chapter 21: C-Level Extensibility
To call the computeSum() function from the Insert Horizontal Rule object:
1 Create a folder called JSExtensions in the Configuration folder within the Dreamweaver
application folder.
2 Copy Sample.dll (Windows) or Sample (Macintosh) to the JSExtensions folder.
3 In a text editor, open the HR.htm file in the Configuration/Objects/Common folder.
4 Add the line alert(Sample.computeSum(2,2)); to the objectTag() function, as shown in
the following example:
function objectTag() {
// Return the html tag that should be inserted
alert(Sample.computeSum(2,2));
return "<HR>";
}
5 Save the file and restart Dreamweaver.
To execute the
computeSum() function, select Insert > Horizontal Rule.
A dialog box that contains the number 4 (the result of computing the sum of 2 plus 2) appears.