Previewing Application Pages
As you develop applications in ColdFusion Studio, you can preview dynamic pages against the ColdFusion Server. Studio offers an internal browser, but you can also configure it to launch your browser in a separate window.
Note that in order to preview dynamic pages you must
- Configure external browsers.
- Have a Web server running on a server or workstation, and access to a ColdFusion server.
- Establish mappings that associated the physical directory where a file is stored with a server mapping and a URL. These mappings can be to a local server or to an RDS server.
Remote Development Services server mappings
If you are building pages and want to preview them against an RDS server, you must translate ColdFusion Studio paths to URLs. These URLs are resolved using the following logic:
- If you are previewing a file opened using the RDS remote file access, the URL resolution uses only the mappings for the specific RDS server.
- For all other files (local, mapped drives, UNC\NetworkNeighborhood), the URL is resolved against the cumulative summary of mappings for all RDS servers. When more than a single mapping resolved to a URL, a dialog prompts the user to select which resolution they want to use.
- When a browsed file cannot be resolved to a URL, it is viewed as a local copy.
Whenever URL resolutions are used, you need to save the file for the changes to appear.
For more detailed information on understanding RDS mappings, see the Debugging and Troubleshooting chapter in this book.
Viewing pages in the internal browser
In the Browse pane of the Settings dialog box (F8), you can choose to use Microsoft Internet Explorer 3.01 or higher as the internal browser for ColdFusion Studio.
Note
Because of the way Netscape Navigator is built, it cannot be used as the internal browser in ColdFusion Studio.
To preview a page in the internal browser:
- To see the current open document in Studio's internal browser, click the Browse tab in the editor window.
The Browse view shows how your code, text, and graphics look in a Web browser.
- To return to edit mode, choose the Edit tab.
Viewing pages in your external browser
You can choose to view the current document in an external browser. Studio automatically detects which browsers you have installed and lists them in a drop-down menu when you choose the External Browser tool on the View toolbar.
To configure Studio to use your external browser:
- Choose Options > Configure External Browsers to open the External Browsers dialog box.
You can add, edit, and delete browser listings, and use the arrow tools to re-order
the list of browsers.
- To add your browser, click Add and in the Browser dialog box, enter its name and the location of the *.exe file. Click OK.
- Choose whether Studio should browse the page using a temporary copy, (meaning you do not have to save the page first), prompt you to save your changes, or automatically save changes whenever you launch an external browser.
- Click OK.
Now when you press the External Browser tool on the View menu, your external
browsers are configured according to your preferences.
Visual editing in the Design view
Studio provides an optional visual editing view, called Design View, which lets you edit HTML code while seeing how the results would look in a browser.
The Design view is most useful if you're a new user, if you're designing the major HTML elements that fit on a page, or if you're creating a complex table and want to create the table's form visually without coding the TABLE tags.
Note
The Design view feature requires Microsoft's Internet Explorer 4.01 or later. If you don't have this browser installed, or if you don't intend to use the Design view, you can disable the Design view in the Design page of the Settings (F8) dialog box.
To edit a page in Design view:
- With a document open in the Edit window, save your changes and select the Design tab in the editor. The Design view opens, showing a browser view of the document that you can also use to edit text, styles, and graphics.
- Use the Design view toolbars to edit text, change styles, add colors, or create HTML tables and form elements.
- If you've opened Design view and now prefer to cancel any changes, select the Cancel Design View button to discard all changes and return to the Edit view.
- Use the Edit and Browse tabs to return to the Edit and Browse modes.
AllaireDoc@allaire.com
Copyright © 1998, Allaire Corporation. All rights reserved.