Archive for July, 2006

Using Code Snippets in Dreamweaver

A snippet is a chunk of code that you can store in Dreamweaver to reuse later. Snippets can include HTML, JavaScript, ASP, JSP, etc. For example, let’s say you need to add several graphics to your Web site, and each graphic is in a two-cell table with the graphic in the upper cell and the caption in the lower cell. Since you will use the same table (with different content) several places on the site, there is no need to create the table each time. Simply create it once, save it as a snippet, and reuse it whenever you need to.

Dreamweaver also contains some predefined snippets that you can use as a starting point. For example, one snippet of JavaScript lets you add a Close button to any Pop-up windows you include on your Web site. This snippet obviates the need to create the code for each window.

Dreamweaver also includes snippets of code that lets you add a Browse for File… button, a variety of formatted tables, drop-down menus, a Print button, navigation aids such as breadcrumb links, and many more options.