View Full Version : Help w. Swap Image

05-03-2011, 08:12 PM
Hi all,

I have created my first Dreamweaver website 6 months ago. Now I'm trying to create a timed image rotator, using Swap Image in DW, using this guide

If I use a blank page and follow the above guide, there's no problem. It works like a charm :)

But now I'm trying to put it onto an existing website. I have created a template and used this to create all the pages of the site. I thought it was super clever back then, but now I cannot put any code into the body tag.
Is there anyway I can edit the code of the body tag, when I have made a page using a template?
I would perfer not having to create the page from the bottom, so in case I cannot edit the body tag, is there anyway I I convert the .dwt template into a regular .html in order to be able to edit the bodytag?

I hope my questions make sense :)

Kind Regards

05-04-2011, 04:20 AM
not up with DW templates but dont you just create an editable region , you then make a page based on that template

05-04-2011, 05:52 AM
I think you could make onload an editable attribute in the body tag of your template and then add the preloadImgs();randomImages(); on a page by page basis as needed.

menu: Modify>Templates>Make Attribute Editable

05-04-2011, 06:25 PM
Hi Guys,

Thanks for your advice.

DW would not allow me to make the <body> editable.

I could not get it to work, by making the onload to an editable attribute. I could make the onload editable, but Dreamweaver would then save the page as a template.
But when opening the Modify>Templates menu I noticed an option called Detach from Template. I did excactly what the name says, and I was able to edit the entire page :)

05-04-2011, 06:42 PM
Editable attribute is applied in the template so that the tag then becomes editable on the individual pages (through the Template Properties menu item).

Detach from template will always work but the page will no longer update with the template.

05-11-2011, 05:27 PM
Hi all,

I've used the same process for adding a timed image swap to a page and it worked fabulously, thank you!

However, I need to make 5 images swap with 5 other images. Can I add something to the script to make that possible?

To clarify -- I have 5 photos beside each other. Each photo (A-E) needs to swap with their corresponding photo (a-e), preferably on a graduted timestamp (7 sec, 8 sec, 9 sec, 10, sec, 11 sec).

Any ideas?