Forum Moderators: open

Message Too Old, No Replies

Dreamweaver Templates - Locked area - Install 'pre-load images'

A template created page will not accept 'pre load images' code

         

Brougham

12:05 pm on Nov 28, 2004 (gmt 0)

10+ Year Member



Have searched within Webmaster World but can't find - so here goes.

Using Dreamweaver MX - Am trying to put a swap images command with pre load images into an editable area of a template created page. All ok except that the 'pre load' images code is not installed. I'm assuming that this is because the 'pre load' code is normally installed into the <body> tag which is in the locked area of the template and is thus rejected.

I guess I could place the <body> into an editable area within the template but that starts to remove the advantages of using a template as any <body> tag changes will have to be manually corrected in a couple of hundred derived pages.

I'd be grateful for any guidance.

Many thanks.

dickbaker

10:30 pm on Nov 28, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is there a reason you can't change the editable areas of the template so that MX will allow you to enter the code?

hfwd

4:13 am on Nov 29, 2004 (gmt 0)

10+ Year Member



The "pre-load" code in Dreamweaver is a simple javascript that you can reference in an external .js file. You can put this in the <head> section and you should be fine.

DerekH

6:53 pm on Nov 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Actually, there's a technical note about this on the Macromedia website.
A search of their support area for "javascript template" (without the quotes) will take you to an article with 4 workarounds.

DerekH

Brougham

7:12 pm on Nov 29, 2004 (gmt 0)

10+ Year Member



Gentlemen, I'm very grateful to you all. I've got this working by using the Dreamweaver - Behaviours - Pre Load Image command and associating this with the image on the page which is going to be replaced with the separate 'Swop Image' command. Doing so associates the 'preload' code with the original image within the editable area instead of within the <body> tag.

However I can see from your comments that there are more preferable ways to go - and I shall experiment.

Thanks again.