Hi, just a a question about the random image function in Actinic, we've got it working well within our site but i'm wanting to add 'Alt' array to it. Is this possible and how would we go about doing it?
our header code is:
and
Any help would be greatfully appreicated.
our header code is:
HTML Code:
<script type="text/javascript"> var cvimages=new Array('<actinic:variable name="IMAGE13" />','<actinic:variable name="IMAGE14" />','<actinic:variable name="IMAGE15" />','<actinic:variable name="IMAGE16" />','<actinic:variable name="IMAGE17" />','<actinic:variable name="IMAGE18" />','<actinic:variable name="IMAGE19" />','<actinic:variable name="IMAGE20" />','<actinic:variable name="IMAGE21" />','<actinic:variable name="IMAGE22" />'); var cvlinks=new Array('<actinic:variable name="LINK13" />','<actinic:variable name="LINK14" />','<actinic:variable name="LINK15" />','<actinic:variable name="LINK16" />','<actinic:variable name="LINK17" />','<actinic:variable name="LINK18" />','<actinic:variable name="LINK19" />','<actinic:variable name="LINK20" />','<actinic:variable name="LINK21" />','<actinic:variable name="LINK22" />'); var images=new Array(); var links=new Array(); for (var i=0; i < cvimages.length; i++) { if (cvimages[i] != '') { images.push(cvimages[i]); links.push(cvlinks[i]); } } idx = Math.floor(Math.random()*images.length - 0.01); showlink = (links[ idx ] != ''); </script>
and
HTML Code:
<script language=JavaScript> <!-- if (showlink) document.write('<a href="' + links[ idx ] + '">'); document.write('<img border=0 class=moiicon src="' + images[ idx ] + '">'); if (showlink) document.write('<\a>'); //--> </script>
Comment