Working with Files


Now that you've successfully defined the ows site, it's time for you to practice working with files in Dreamweaver. You'll learn how to organize your site, save, close, and open files and how to manage multiple document windows. In chapter 4, you will learn more about working with Dreamweaver. For now let's get you set up for that and practicing a few basic techniques.

Creating a Work Directory and File

As I explained earlier, to simplify organizing the code created in this book, each chapter's code goes in its own directory.

To create a directory for this chapter, do the following:

1.

Right-click the ows folder at the top of the Files panel.

2.

Select New Folder.

3.

Name the folder 1 (for Chapter 1), and then press Enter (Return).

4.

Repeat the steps above, but this time go ahead and name the folder 2 (for Chapter 2).

TIP

You've done these steps twice because I want you to remember them, as you'll need to repeat them for most of the chapters in this book.


Now you'll create a file. The file will go in the new 2 directory, and will be named index.cfm.

1.

Right-click the 2 directory in the Site tab in the Files panel.

2.

Select New File.

3.

Name the file index.cfm, then press Enter.

4.

Double-click the new file to open it in the editor.

TIP

You can also create files by selecting New from the File menu, or by pressing Control-N.


Let's name the file right away (with an HTML name, the one that appears in the Browser title bar). Above the editor window is a toolbar, and one of the options is a field for the HTML title. By default it will be Untitled Document, so change it to Orange Whip Studios by typing that text in the field. Press Enter to update the title; the HTML below will reflect the change as seen in Figure 2.14.

Figure 2.14. Changing the Title in the Document toolbar updates the page's <title> in the code, which is used in the browser's title bar.


Saving, Closing, and Opening Files

Before you go any further, you need to know how to save, close, and open files.

To save a file, do one of the following:

  • Press Control-S.

  • Select Save from the File menu.

  • Right-click the file name tab (beneath the editor) and select Save.

TIP

If a file has changed since the last save and therefore needs saving again, an asterisk will appear after its name in the file tab.


To close a file, do one of the following:

  • Press Control-W (Command-W).

  • Select Close from the File menu.

  • Right-click the file tab and select Close.

TIP

Windows users can press Control-F4 to close an open file.


To open a file, do one of the following:

  • Press Control-O (Command-O).

  • Select Open from the File menu.

  • Double-click the file in the site list.

TIP

The Standard toolbar, which can be enabled from the View menu in the Toolbars submenu, contains buttons for creating, opening, closing, and saving files.


Testing the Page

Now that you have created a page, you should make sure it's accessible via a Web browser. Open your browser and enter the URL to the page. If you are using the integrated HTTP server, the URL will be:

 http://localhost:8500/ows/2/index.cfm 

If you are using a local external Web server, the URL will probably be:

 http://localhost/ows/2/index.cfm 

The file displayed will be empty (you've put nothing in it), but as long as you don't receive a browser error, and the browser title bar reflects the specified title, you'll know it's working properly. You can now create ColdFusion pages in Dreamweaver MX and access them via ColdFusion using your browser.

TIP

You can launch a browser directly from within Dreamweaver by pressing F12 or by choosing a browser from the list under File > Preview in Browser.




Macromedia Coldfusion MX 7 Web Application Construction Kit
Macromedia Coldfusion MX 7 Web Application Construction Kit
ISBN: 321223675
EAN: N/A
Year: 2006
Pages: 282

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net