
Behaviors." The Application Panel Group As you begin to build dynamic applications in the second half of the book, the Application panel group will become your best friend. The Application panel group, which includes the Databases, Bindings, Server Behaviors, and Components panels, is covered extensively in the second half of the book. The Files Panel Part of the Files panel group and covered in more detail in Chapter 3, "Building a Web Page," the Files panel is a centralized repository for managing sites and files within sites. At its most basic level, the Files panel acts similar to Windows Explorer in that it allows you to browse your computer, network, and desktop. It also lists FTP and RDS servers, again, covered in more detail in Chapter 3. You can make the Files panel visible and hidden by selecting Files from the Window menu or by pressing the F8 shortcut key. The Assets Panel Also part of the Files panel group, the Assets panel is an integrated image, color, URL, Flash, Shockwave, movie, script, template, and library item management window. From this panel, you have various options for managing and working with these features as well as adding and customizing favorites you use most often. You can make the Assets panel visible and hidden by selecting Assets from the Window menu or by pressing the F11 shortcut key. The Snippets Panel The last panel available in the Files panel group is the Snippets panel. The Snippets panel allows you to create and store scripts, markup, and notes that you use and reuse most often. Dreamweaver ships with a set of snippets that include text, navigation, meta, JavaScript, header, form, footer, content table, comment, and accessibility snippets. You can make the Snippets panel visible and hidden by selecting Snippets from the Window menu or by pressing the Shift+F9 shortcut key. There are numerous snippets you can add to your documents. So many, in fact, that I won't attempt to cover them all here. Instead, I'll show you how to easily add a snippet to your page and then show you how to create your own snippets from code. Adding snippets to your page is as easy as finding a snippet that you like and that relates to the functionality you need, and adding it to the page. To add a snippet to your page, follow these steps: 1. Find the Close Window Button snippet located in the Form Elements snippet category. 2. After you've selected the snippet, you should see the snippet code at the top of the panel in the preview window (see Figure 2.36). Figure 2.36. The snippet's code appears in the Snippet panel's preview window. 3. Drag the snippet onto the Document window. You can also select the snippet and click the Insert button in the bottom-left corner of the Snippets panel. Furthermore, you can also double-click the snippet to insert it wherever your cursor is positioned. 4. To preview the functionality, select the Preview In Browser option from the Preview/Debug In Browser submenu in the Document toolbar (or press F12). As you can see from Figure 2.37, clicking the button in the browser causes the browser window to attempt to close itself. Figure 2.37. The Close Window Button snippet is a piece of code that causes the browser window to close. Of course this is a small example of using the Snippets panel but it clearly demonstrates the possibilities. I encourage you to explore the different snippets because they can greatly improve your development efficiency. You might want to add your own snippets to the Snippets panel if you write lengthy code that you don't want to replicate every time you need to use it.