Operation Manual

299
USING DREAMWEAVER
Working with page code
Last updated 3/28/2012
In the Edit column, deselect any edits you do not want to make, or select edits that Dreamweaver did not select
by default.
By default, Dreamweaver lists but does not select the following edits:
Script blocks in the head of the document that contain document.write() or document.writeln() calls.
Script blocks in the head of the document that contain function signatures related to EOLAS handling code,
which is known to use
document.write().
Script blocks in the body of the document, unless the blocks contain only Spry widget or Spry data set
constructors.
Dreamweaver automatically assigns IDs to elements that don’t already have IDs. If you don’t like these IDs, you
can change them by editing the ID text boxes.
4 Click OK.
The summary dialog provides a summary of extractions. Review the extractions and click OK.
5 Save the page.
Dreamweaver creates a SpryDOMUtils.js file, as well as another file that contains the extracted JavaScript.
Dreamweaver saves the SpryDOMUtils.js file in a SpryAssets folder in your site, and saves the other file at the same
level as the page from which you extracted the JavaScript. Don’t forget to upload both of these dependent files to your
web server when you upload the original page.
More Help topics
Building Spry pages visually” on page 399
Work with code snippets
Code snippets let you store content for quick reuse. You can create, insert, edit, or delete snippets of HTML, JavaScript,
CFML, ASP, PHP, and more. You can also manage and share your code snippets with team members. Some predefined
snippets that you can use as a starting point are available.
Snippets that contain <font> tags and other deprecated elements and attributes are in the Legacy folder in the Snippets
panel.
Insert a code snippet
1 Place the insertion point where you want to insert the code snippet, or select code to wrap a snippet around.
2 In the Snippets panel (Window > Snippets), double-click the snippet.
You can also right-click (Windows) or Control-click (Macintosh) the snippet, and then select Insert from the pop-up menu.
Create a code snippet
1 In the Snippets panel, click the New Snippet icon at the bottom of the panel.
2 Enter a name for the snippet.
Note: Snippet names can’t contain characters that are invalid in filenames, such as slashes(/ or \), special characters, or
double quotes (“).
3 (Optional) Enter a text description of the snippet. This makes it easier for other team members to use the snippet.