I am trying to use a version of this to put a rotating image inside a vBa CMPS Module and I am not quite clear what I am doing wrong or how this works (I am not a Java person yet)...
That I did was I created a template "adv_portal_advertisement"
Which says:
Quote:
<tr><td>
<!-----Banner ads-------->
<SCRIPT LANGUAGE="JavaScript">
pix=new Array("http://www.YOUR-IMAGE-LINK-1","http://www.YOUR-IMAGE-LINK-2","http://www.YOUR-IMAGE-LINK-3") ;
links=new Array("http://www.URL-FOR-IMAGE-1","http://www.URL-FOR-IMAGE-2","http://www.URL-FOR-IMAGE-3") ;
imCt=pix.length;
function ranImage(){
ran=Math.floor(Math.random()*imCt);
document.images["image"].src=pix[ran];
document.getElementById("IMFbanner") .href=links[ran];
}
</script>
<!----- ads----------->
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]"
class="tborder" width="100%">
<tr>
<td class="tcat"><b><DIV ALIGN=CENTER>Advertisement</b></div></td>
</tr>
<tr>
<td class="alt1" align="center"><BR>
<a href="http://www.URL-FOR-IMAGE-1" id="IMFbanner" target="_blank"><img src="http://www.YOUR-IMAGE-LINK-1" name="image" border="0"></a>
<BR>
</td>
</tr>
</table>
<br />
<!-----end ads----------->
<!-----End Banner ads-------->
</td></tr>
|
(Note, same script above but as part of a module it needs to put inside a TR)
From there I created a Template module that calls the above template... When I run this, the only part of the above script that runs is the part in the:
Code:
<td class="tcat"><b><DIV ALIGN=CENTER>Advertisement</b></div></td>
</tr>
<tr>
<td class="alt1" align="center"><BR>
<a href="http://www.URL-FOR-IMAGE-1" id="IMFbanner" target="_blank"><img src="http://www.YOUR-IMAGE-LINK-1" name="image" border="0"></a>
<BR>
</td>
How do I add multiple ads to the above? When I try to add a second table to the ads section I get two images one on top of the other and they do not rotate... for example:
Code:
<!----- ads----------->
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]"
class="tborder" width="100%">
<tr>
<td class="tcat"><b><DIV ALIGN=CENTER>Advertisement</b></div></td>
</tr>
<tr>
<td class="alt1" align="center"><BR>
<a href="http://www.URL-FOR-IMAGE-1" id="IMFbanner" target="_blank"><img src="http://www.YOUR-IMAGE-LINK-1" name="image" border="0"></a>
<BR>
</td>
</tr>
</table>
<br />
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]"
class="tborder" width="100%">
<tr>
<td class="tcat"><b><DIV ALIGN=CENTER>Advertisement</b></div></td>
</tr>
<tr>
<td class="alt1" align="center"><BR>
<a href="http://www.URL-FOR-IMAGE-2" id="IMFbanner" target="_blank"><img src="http://www.YOUR-IMAGE-LINK-2" name="image" border="0"></a>
<BR>
</td>
</tr>
</table>
<br />
<!-----end ads----------->