
Originally Posted by
TheBuz
hi i am trying to get this code
to run just on the products pages, i can get the code running across the whole site but not just on the products pages.
i've created a .js file (without script tags) and put it in the product_info folder and now im really stuck and dont know which files to edit

, any help would be very much appreciated thank you
You can add the style to your site stylesheet or create one of your own and place it in the css folder. The JS can go ether in the head or in the body, they actually suggest placing it in the body right under the div tag, thus making it easy to just have it display on a product page. Open includes\templates\YOUR_SITE\templates\tpl_product_info_display.php
and place there div and javascript after this line
Code:
<div class="centerColumn" id="productGeneral">
so it looks like this..
Code:
<div id="loading" class="loading-invisible">
<p><img src="../images/loading.gif" alt="Loading..." /></p>
</div>
<script type="text/javascript">
document.getElementById("loading").className = "loading-visible";
window.onload=function(){
document.getElementById("loading").className = "loading-invisible";
}
</script>
to have the script in the head, just add it to includes\modules\pages\product_info\jscript_main.php
make sure to remove its script tags and it can go before the closing script tag in jscript_main.php