Dreamweaver CS4 Resources
|
Previewing pages in browsers
Preview in a browserYou can preview a page in a browser at any
time; you don’t have to upload it to a web server first. When you
preview a page, all browser-related functions should work, including
JavaScript behaviors, document‑relative and absolute links, ActiveX® controls, and Netscape Navigator plug‑ins,
provided that you installed the required plug‑ins or ActiveX controls
in your browsers.
Before previewing a document, save the
document; otherwise, the browser does not display your most recent
changes.
- Do one of the following to preview the page:
Select
File > Preview In Browser, and then select one of the
listed browsers.
Note: If no browsers are listed, select Edit >
Preferences or Dreamweaver > Preferences
(Macintosh), and then select the Preview In Browser category on
the left to select a browser.
Press F12 (Windows) or Option+F12 (Macintosh) to
display the current document in the primary browser.
Press Control+F12 (Windows) or Command+F12 (Macintosh)
to display the current document in the secondary browser.
- Click links and test content in your page.
If you use Internet Explorer on a Windows XP computer with
Service Pack 2 installed, the browser may display a message that
tells you it has restricted the file from showing active content.
You can fix this problem by including Mark of the Web code in the
file. Note: Content linked with a site root-relative path does not
appear when you preview documents in a local browser unless you
specify a testing server, or select the Preview Using Temporary
File option in Edit > Preferences > Preview
In Browser. This is because browsers don’t recognize site roots—servers
do.
 To preview content linked with root-relative
paths, put the file on a remote server, and then select File >
Preview In Browser to view it.
- Close the page in the browser when you finish testing.
Set browser preview preferencesYou
can set preferences for the browser to use when previewing a site
and define default primary and secondary browsers.
- Select File > Preview In Browser >
Edit Browser List.
- To add a browser to the list, click the Plus (+) button,
complete the Add Browser dialog box, and then click OK.
- To delete a browser from the list, select the browser,
and then click the Minus (-) button.
- To change settings for a selected browser, click the
Edit button, make changes in the Edit Browser dialog box, and then
click OK.
- Select the Primary Browser or the Secondary Browser option
to specify whether the selected browser is the primary or secondary
browser.
F12 (Windows) or Option+F12 (Macintosh) opens the primary
browser; Control+F12 (Windows) or Command+F12 (Macintosh) opens
the secondary browser.
- Select Preview Using Temporary File to create a temporary
copy for previewing and server debugging. (Deselect this option
if you want to update the document directly.)
Preview active content in Internet Explorer (Windows)If you preview a document that contains
active content in Internet Explorer after installing the Windows
XP Service Pack 2 update, the browser does not show active content.
You can fix this problem by inserting Mark of the Web code in your
document.
Internet Explorer blocks active content and scripting
that tries to run in the Local Machine zone. For security reasons,
Microsoft increased the restrictions on what can run in this zone
by default. Mark of the Web code tells the browser to run active
content in another zone, in this case, the Internet zone. For more
information, see TechNote 19578 on the Adobe website at www.adobe.com/go/19578.
Insert Mark of the Web code With your document open in Dreamweaver, select Commands >
Insert Mark Of The Web. Dreamweaver inserts the following
line in your code:
<!-- saved from url=(0014)about:internet -->
The
line tells the browser to bypass the Local Machine zone and run
the active content in the Internet zone.
Remove Mark of the Web code- In Dreamweaver,
open the document containing the Mark of the Web code.
- Select Commands > Remove Mark Of The Web.
|