I am trying to find out how to shrink my source code by using a .js file for the rollover button images. I have not been able to grasp any of the information I've been finding on the internet, mainly because I learn by example. (I'm fairly new to javascript)
Is there anyone that can explain this to me in simple terms, or include a sample of both the .js file and what is supposed to be placed in the HTML?
I'm getting confused by all the different rules, and am concerned about different browsers. So far, I've only found bits and pieces, but can't seem to put it all together!
Also, I think I may have to change the way I'm using my editor (GoLive) because I currently have my rollovers in a "component" which is placed in all my pages so I only have to manage that component to modify anything (similar to a "Library Asset" in Dreamweaver). However, GoLive automatically generates this ODD code (not W3C compliant, if that means anything) and looks like:
Only with many more buttons here. This ends up looking like a HUGE chunk of code.<csimport user="../mysite.data/Components/nav.html" occur="98">
<csactiondict>
<script type="text/javascript"><!--
CSInit[CSInit.length] = new Array(CSILoad,/*CMP*/'webdesign',/*URL*/'nav/webdesign.gif',/*URL*/'nav/webdesign-over.gif',/*URL*/'','');
// --></script>
</csactiondict>
</csimport>
Any takers? I'd be ever so grateful for some help. Looking for simple JavaScript functions, nothing extremely fancy, but functional without creating a problem across platforms. Is that possible?
Thanks!
Submit Your Article
Forum Rules

Reply With Quote
