Thanks guys! I got the JS to print to the head area.
I still have a problem (let me know if I should start another post?) I am in fact working on putting in a slide show on the home page of my site. My slide show is not working (had this code (similar) working in another (non-xcart) php site before). I think I have an issue with
syntax in the .tpl file(s).
In the "fashion_mosaic_grey/customer/main/wecome.tpl" file I put the following table:
Code:
{*FOLLOWING IS FOR THE DYNAMIDRIVE FADE SLIDESHOW*}
<table align='right' border="0" bordercolor="#fff" style="background-color:#fff" width="600" cellpadding="0" cellspacing="0">
<tr>
<td>
<div id="fadeshow1"></div>
<div id="fadeshow2"></div>
{*<div id="fadeshow2toggler" style="width:300px; text-align:center; margin-top:10px">
<a href="#" class="prev"><img src="http://i31.tinypic.com/302rn5v.png" style="border-width:0" /></a> <span class="status" style="margin:0 50px; font-weight:bold"></span> <a href="#" class="next"><img src="http://i30.tinypic.com/lzkux.png" style="border-width:0" /></a>
</div>*}
</td>
</tr>
</table>
{*ABOVE IS FOR THE DYNAMIDRIVE FADE SLIDESHOW*}
and in the "common_files/customer/meta.tpl" file I put this at the end:
Code:
{if $main eq "catalog" and $current_category.category eq ""}
{*BELOW CODE IS FOR THE DYNAMIC DRIVE SLIDE SHOW*}
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="fadeslideshow.js">
/***********************************************
* Ultimate Fade In Slideshow v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/
</script>
<script type="text/javascript">
var mygallery=new fadeSlideShow((
wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
dimensions: [300, 300], //width/height of gallery in pixels. Should reflect dimensions of largest image
imagearray: [
["../../../images/Ztest/110115.jpg, "", "", ""],
["../../../images/Ztest/110825.jpg", "", "", ""],
["../../../images/Ztest/111225.jpg", "", "", ""] //<--no trailing comma after very last image element!
],
displaymode: (type:'auto', pause:2500, cycles:0, wraparound:false),
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 500, //transition duration (milliseconds)
descreveal: "none"
))
var mygallery2=new fadeSlideShow((
wrapperid: "fadeshow2", //ID of blank DIV on page to house Slideshow
dimensions: [300, 300], //width/height of gallery in pixels. Should reflect dimensions of largest image
imagearray: [
["../../../images/Ztest/111476.jpg", "", "", ""],
["../../../images/Ztest/111512.jpg", "", "", ""],
["../../../images/Ztest/111848.jpg", "", "", ""] //<--no trailing comma after very last image element!
],
displaymode: (type:'auto', pause:2500, cycles:0, wraparound:false),
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 500, //transition duration (milliseconds)
descreveal: "none"
))
</script>
{*ABOVE CODE IS FOR THE DYNAMIC DRIVE SLIDE SHOW*}
{/if}
In the original code I found on DynamicDrive, there were brackets in place of the red and blue parenthesis in the second set of code above, but it didn't work (it didn't print the info between the brackets)(?maybe improper syntax for TPLs?) so I replaced with parenthesis which printed fine though I am not sure if the parenthesis work in the fadeshow code?
Any ideas on this on this? Maybe what I need to do is get the brackets to print in the head? If so, how?
Thank you!