View Full Version : Conflicting Javascript Files (import libraries)

08-26-2008, 02:48 AM
Hi All,

I am working on an osCommerce site and am in the process of customizing the product page. I added a contribution for image overlay (lightbox2) and now want to add a social bookmarking button (OSC Socializer).

The problem is that the image overlay package uses "scriptaculous" while the social bookmarking button uses "mootools". Evidently there is some overlapping here as the image button does not work while the scriptaculous import statements are in the html head section. If I comment scriptaculous statements out, the social bookmarking button works fine.

Here are my import statements.

<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="js/lightbox.js"></script>
<script language="javascript" type="text/ecmascript" src="social/js/mootools-1.2-core.js"></script>
<script language="javascript" type="text/ecmascript" src="social/js/socializer.js"></script>
<link href="social/css/socializer.css" rel="stylesheet" type="text/css" />

Is there any way I can do selective imports for either package directly within the body?

Any ideas about a viable approach?