[thelist] DW and adding id attributes

Diane Soini dianesoini at earthlink.net
Tue Aug 24 20:25:06 CDT 2004


On Tuesday, August 24, 2004, at 04:10 AM, 
thelist-request at lists.evolt.org wrote:
>
>
> I'm wondering if it's possible to tweak Dreamweaver so that if a name 
> attribute has been added to a form element that it automatically 
> duplicates this value as the id attribute - I know there'd be some 
> problems with this, but it'd save me banging my head against the wall 
> and having to edit my colleagues' wireframe code when I start the 
> CSS-fu.
>
> Done some digging around and not found anything on the interweb, but 
> that maybe due to not tickling Google in the correct places...
>

I'm sure you could do it, and you could probably figure it out by trial 
and error. The only problem would be that DW has this "onaftersave" 
function that might put all those ID attributes in there if you try to 
remove them and save the file. So, if you want the default to be to add 
them, then to remove them you might have to do it outside of DW. I 
found that out when I hacked something in the past, but I can't recall 
what it was. Drove me nuts that I'd fix the file, then save it and when 
I opened the file again, it was back to what it was before fixing it. 
This is how DW rewrites your code!

Look in the DW files in your application's files. On my Mac, it's in 
Applications/Macromedia Dreamweaver MX/Configuration/Objects/Forms/. On 
the PC it's a similar location. There are a bunch of .js and .htm files 
in there. That's what you hack. Either the .js or the .htm, depending 
on what you want to do. Be sure to make a back-up first. Sometimes it 
works and sometimes it doesn't.

> Thanks
>
> Justin
>
> --
> Justin Stach
> Web Systems Administrator - Computing Services
> Canterbury Christ Church University College
> [t] 01227 767700 ext 3178
> [e] j.m.stach at canterbury.ac.uk
>
My BF's job went to China so he opened a T-shirt store:
http://www.cafepress.com/abiegen.13058271



More information about the thelist mailing list