This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > February 2006 > Re: if i delete all the elements on a page, why does the code still





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: if i delete all the elements on a page, why does the code still
David Powers

2006-02-07, 10:40 pm

mediastream13 wrote:
> when i am in design view the page is blank, but when i go to code view, the
> code for all the elements that i have just deleted in design view, is still
> there. for example i created a fw navbar and placed it on the page, and dw
> automatically wrote the code for it. however, i didn't like how the navbar
> looked so i deleted it, and when i looked at the code it was still there but
> the navbar was deleted. does that make any sense?


Yes, it makes sense to me. It's probably one of the most common mistakes
that is made with Dreamweaver. I speak from personal experience, because
I did the same when I first started using it.

The answer is actually very simple. When you insert a nav bar or any
other element that uses JavaScript, a reference to it appears in the
Behaviors panel. To remove an item, don't delete it in Design view, but
highlight its listing in the Behaviors panel and click the minus button.
That removes all the JavaScript elements. You can then safely remove any
graphic or HTML elements in Design view.

It's the same with server-side code, PHP, ASP and so on. You must always
use the Server Behaviors panel to remove code that has been created by
Dreamweaver. It's the only safe way.

--
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://computerbookshelf.com/
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews