O'Reilly logo

Dreamweaver in a Nutshell by Bruce A. Epstein, Heather Williamson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Customizing the Objects Panel

In earlier chapters, we used the Objects panel to insert many built-in objects into an HTML document. You can add a custom icon to the Objects panel to insert any object. The Objects panel offers greater flexibility than library items, which insert HTML code only. To create a new object for the Objects panel, create an HTML document, including JavaScript that inserts your object into the current document.

Basing your new object on one of the existing objects in the Dreamweaver4/C onfiguration/Objects folder is your most convenient option. Within that folder are subfolders corresponding to the seven default categories of the Objects panel (Characters, Common, Forms, Frames, Head, Invisibles, and Special) plus a Tools folder for the Draw Layout Table and Draw Layout Cell tools that are always visible in the Objects panel

Tip

The subfolder in which an object file is placed determines the category under which it appears in the Objects panel. Items can be moved between folders, and folders can be renamed.

Search for “Creating a simple object” under Help Using Dreamweaver (F1) for an example of adding a simple object to the Objects panel. Example 19-3 shows the Button.htm file from the Configuration/Objects/Forms directory.

Example 19-3. A sample object definition file

<HTML><HEAD> <!-- Copyright 1999 Macromedia, Inc. All rights reserved. --> <TITLE>Insert Button</TITLE> <SCRIPT LANGUAGE="javascript" SRC="../../Shared/MM/Scripts/CMN/docInfo.js"> </SCRIPT> <SCRIPT ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required