Tom Mouser
02-03-2010, 11:16 PM
1) Script Title: Blending Image Slideshow
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/image4.htm
3) Describe problem: I am using Dynamic Drive Image Blending but I would like to use My home page table in place of one of the images. The code works fine but I cant put the Table into the Array so it can blend as well.
How do I put this table in my image array.
<ss:set name="featuredCats" value="$store.categories.getFeaturedCategoriesInUse()"/>
<ss:if test="$featuredCats">
<table border="0" cellpadding="2" cellspacing="2" width="100%">
<tr>
<td colspan="5" style="border:1px solid #cccccc;padding:5px;">
<b>Featured Categories</b>
</td></tr>
<tr valign="top">
<ss:foreach item="category" within="$featuredCats">
<td width="20%" valign="bottom" style="border:1px solid #cccccc;padding:10px;">
<ss:if test="$category.photo">
<ss:link source="$category">
<ss:image source="$category.photoImage" alt="$category.name" vspace="5" border="0"/></ss:link>
<br>
</ss:if>
<ss:link source="$category">
<b><ss:value source="$category.name"/></b></ss:link>
<ss:foreach item="subCat" within="$category.childCategories">
<div style="font-size:11px;"> » <ss:link source="$subCat"/></div>
</ss:foreach>
</td>
</ss:foreach>
</tr>
</table>
<br>
</ss:if>
The Blending Image Array (Header Page Script)
<head>
<script language="JavaScript1.1">
<!--
//*****************************************
// Blending Image Slide Show Script-
// © Dynamic Drive (www.dynamicdrive.com)
// For full source code, visit http://www.dynamicdrive.com/
//*****************************************
//specify interval between slide (in mili seconds)
var slidespeed=3000
//specify images
var slideimages=new Array("http://i30.tinypic.com/531q3n.jpg","http://www.whattadeal.org/images/THEBIGSTORE2/zztenpieced.jpg","<<ss:value source="$customer.firstName"/>")
//specify corresponding links
var slidelinks=new Array("http://www.fingerhut.com/","http://www.target.com/","http://www.geocities.com")
var newwindow=1 //open links in new window? 1=yes, 0=no
var imageholder=new Array()
var ie=document.all
for (i=0;i<slideimages.length;i++){
imageholder[i]=new Image()
imageholder[i].src=slideimages[i]
}
function gotoshow(){
if (newwindow)
window.open(slidelinks[whichlink])
else
window.location=slidelinks[whichlink]
}
//-->
</script>
</head>
Code to make array display
<a href="javascript:gotoshow()"><img src="image1.gif" name="slide" border=0 style="filter:blendTrans(duration=3)" width=97 height=100></a>
<script language="JavaScript1.1">
<!--
var whichlink=0
var whichimage=0
var blenddelay=(ie)? document.images.slide.filters[0].duration*1000 : 0
function slideit(){
if (!document.images) return
if (ie) document.images.slide.filters[0].apply()
document.images.slide.src=imageholder[whichimage].src
if (ie) document.images.slide.filters[0].play()
whichlink=whichimage
whichimage=(whichimage<slideimages.length-1)? whichimage+1 : 0
setTimeout("slideit()",slidespeed+blenddelay)
}
slideit()
//-->
</script>
<p align="center"><font face="arial" size="-2">This free script provided by<br>
<a href="http://www.dynamicdrive.com">Dynamic Drive</a></font></p>
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/image4.htm
3) Describe problem: I am using Dynamic Drive Image Blending but I would like to use My home page table in place of one of the images. The code works fine but I cant put the Table into the Array so it can blend as well.
How do I put this table in my image array.
<ss:set name="featuredCats" value="$store.categories.getFeaturedCategoriesInUse()"/>
<ss:if test="$featuredCats">
<table border="0" cellpadding="2" cellspacing="2" width="100%">
<tr>
<td colspan="5" style="border:1px solid #cccccc;padding:5px;">
<b>Featured Categories</b>
</td></tr>
<tr valign="top">
<ss:foreach item="category" within="$featuredCats">
<td width="20%" valign="bottom" style="border:1px solid #cccccc;padding:10px;">
<ss:if test="$category.photo">
<ss:link source="$category">
<ss:image source="$category.photoImage" alt="$category.name" vspace="5" border="0"/></ss:link>
<br>
</ss:if>
<ss:link source="$category">
<b><ss:value source="$category.name"/></b></ss:link>
<ss:foreach item="subCat" within="$category.childCategories">
<div style="font-size:11px;"> » <ss:link source="$subCat"/></div>
</ss:foreach>
</td>
</ss:foreach>
</tr>
</table>
<br>
</ss:if>
The Blending Image Array (Header Page Script)
<head>
<script language="JavaScript1.1">
<!--
//*****************************************
// Blending Image Slide Show Script-
// © Dynamic Drive (www.dynamicdrive.com)
// For full source code, visit http://www.dynamicdrive.com/
//*****************************************
//specify interval between slide (in mili seconds)
var slidespeed=3000
//specify images
var slideimages=new Array("http://i30.tinypic.com/531q3n.jpg","http://www.whattadeal.org/images/THEBIGSTORE2/zztenpieced.jpg","<<ss:value source="$customer.firstName"/>")
//specify corresponding links
var slidelinks=new Array("http://www.fingerhut.com/","http://www.target.com/","http://www.geocities.com")
var newwindow=1 //open links in new window? 1=yes, 0=no
var imageholder=new Array()
var ie=document.all
for (i=0;i<slideimages.length;i++){
imageholder[i]=new Image()
imageholder[i].src=slideimages[i]
}
function gotoshow(){
if (newwindow)
window.open(slidelinks[whichlink])
else
window.location=slidelinks[whichlink]
}
//-->
</script>
</head>
Code to make array display
<a href="javascript:gotoshow()"><img src="image1.gif" name="slide" border=0 style="filter:blendTrans(duration=3)" width=97 height=100></a>
<script language="JavaScript1.1">
<!--
var whichlink=0
var whichimage=0
var blenddelay=(ie)? document.images.slide.filters[0].duration*1000 : 0
function slideit(){
if (!document.images) return
if (ie) document.images.slide.filters[0].apply()
document.images.slide.src=imageholder[whichimage].src
if (ie) document.images.slide.filters[0].play()
whichlink=whichimage
whichimage=(whichimage<slideimages.length-1)? whichimage+1 : 0
setTimeout("slideit()",slidespeed+blenddelay)
}
slideit()
//-->
</script>
<p align="center"><font face="arial" size="-2">This free script provided by<br>
<a href="http://www.dynamicdrive.com">Dynamic Drive</a></font></p>