3 Replies Latest reply: May 3, 2009 2:49 PM by MurraySummers RSS

    How to prevent the insertion of rollover code when using a template

    theMikeD Community Member

      Hi there


      I am designing a site in Dreamweaver using templates. These templates use rollover images. The code that DW uses for the rollover I have abstracted out into a separate javascript file, which is linked to in the header. Further, I am using window.onload() to call the preloader instead of the <body> onload event. All this works fine.


      The problem is that every time I make a change to the template, DW re-inserts the rollover code into the head of the HTML file, and reinserts the preloader code into the <body> tag.


      Now, I have found a solution to the <body> tag problem by changing the preload flag from 1 to 0 in the link created; it seems that DW uses this flag as in indication of whether to insert the onload code into the boday tag.  So that part is fixed.

       

      But I can't find any way to keep DW from inserting the unecessary and redundant rollover code into the head of the generated HTML files.  Is there a way I can prevent this from happening?

       

      ...Mike