Forum Moderators: open
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.
Is there a way I can prevent this from happening?
...Mike
The structure of the rollover bit looks like this:
<a href="index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('home','','common/home2.jpg',0)"><img src="common/home1.jpg" name="home" width="61" height="25" border="0"></a> The important bit is the ,0 at the end of the JS call MM_swapImage('home','','common/home2.jpg',0) which is the preloader flag. When set to 1, it preloads, and 0 it does not. So, I changed all the ,1 to ,0 in the rollover links in the templates, and presto, the onLoad method is gone.
So now I just have to find a way to keep the JS from being inserted.
...Mike