
Originally Posted by
fluxem
ya I agree.. so back to my original question..
i have rollovers on my site.. using onLoad="preloadImages();"
how would I combine that with
<body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>>
You can achieve this effect by using the "overrides" system in Zen Cart. (In case you don't want to go that route, I included the code below for you to use, but I would recommend going with the overrides since it allows the js to be automatically loaded on every page (you may miss a few pages if you try to insert it manually)
Here would be the preferred method (using overrides):
Step 1: Create a javascript file that contains the "PreLoad" event fuctions, and save it with a name that starts like this "jscript_[yourFileNamehere].js". Upload that javascript file into your template's jscript folder. (Any file placed in this folder with "jscript_" in the front will automatically be included in every page on your site).
Step 2: Create a file and save it as on_load_[yourSelectedFileName].js. In that file, only include the following line of code preloadImages();
Upload that file to your templates jscript/on_load folder in order to have the on-load events trigger properly.
Here would be the "manual" method:
PHP Code:
<body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="preloadImages(),'.$zv_onload.'"'; ?>>
That should do it.
Bookmarks