Saving, Closing, and Opening a Frame

Team-Fly    

Macromedia® DreamWeaver® MX Unleashed
By Matthew Pizzi, Zak Ruvalcaba
Table of Contents
Chapter 7.  Framesets


I decided to include this section based on common questions students ask in my Dreamweaver classes. As you work in your frameset, if you find you're working on only one frame, you can choose File, Save Frame. If you're modifying all or some of the frames, you can choose File, Save All.

I do not recommend the technique I'm about to discuss; it's too easy to make a mistake and overwrite files. However, this is a book about Dreamweaver and not about some careless mistakes I made in the past, so if you're careful, you should be okay, but when you do overwrite a file it's not my fault.

Matt's Unapproved Technique for Creating a New Document

So you have a frameset designed and each frame looks great. Now it's time to start adding new pages. The pages you want to load into the frameset have to match, so it'll be easier to design a new HTML document with the frameset open. In fact, you start dismantling one of the frames and begin designing right on top of it. When you're satisfied, you need to save it, so here's how it is done.

After designing the frame in place, and after you're happy with it, you do not want to overwrite the original file because you still need it to show up when the page first loads. Therefore, choose Files, Save Frame As to launch the Save As dialog box. Here, type in the filename and choose Save. Here's the important part; if you still want the original frame to load in the location you created the new file, when closing the document, you'll get an alert message. It's asking you if you want to save the parent frame. The reason for that is because if you look at your document, one of the original frames has been replaced with the new one that you designed. So that you can see the new document in the place where you want it to load, the parent source HTML has been changed. It used to look like this:

 <frameset rows="80,*" cols="*">  <frame src="/books/4/291/1/html/2/top.html" name="topFrame" scrolling="NO">     <frameset rows="*" cols="192,400*">     <frame src="/books/4/291/1/html/2/left.html" name="left">     <frame src="main.html" name="mainFrame">     </frameset> </frameset> 

But the frame src has been modified for the mainframe, so the code now looks like this:

 <frameset rows="80,*" cols="*">  <frame src="/books/4/291/1/html/2/top.html" name="topFrame" scrolling="NO">     <frameset rows="*" cols="192,400*">     <frame src="/books/4/291/1/html/2/left.html" name="left">     <frame src="page1.html" name="mainFrame">     </frameset> </frameset> 

WARNING

The HTML in the parent frame may not reflect this before saving. The altered source appears in the HTML document only after it has been saved.


If you do not want to change the original document in the frame in which you designed a new page, choose No in the alert message.

Closing and Opening a Frameset

Closing a frameset is just like closing any other document. If you forget to save any changes made to a document, Dreamweaver warns you with an alert dialog box. However, how do you open your frameset so it appears in the same way? If you want to open the entire frameset, open the parent frame, or the parent HTML document. This opens all dependent files.

WARNING

If you saved a frameset but haven't added any content to it, after opening the parent frame, it may appear as if it isn't opening all the documents. This is because Dreamweaver turns off frame borders and you have to turn them back on by choosing View, Visual Aids, Frame Borders.


If you plan on previewing a frameset in a browser, you must save the frameset first. If you don't, Dreamweaver alerts you to save the frameset. If you check the Don't Warn Me Again box, Dreamweaver will automatically save the frameset when you test it.


    Team-Fly    
    Top


    Macromedia Dreamweaver MX Unleashed
    Macromedia Dreamweaver MX 2004 Unleashed
    ISBN: 0672326310
    EAN: 2147483647
    Year: 2002
    Pages: 321

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