View Single Post
  #8  
Old 02-18-2008, 01:17 PM
 
inebriate inebriate is offline
 

eXpert
  
Join Date: May 2006
Posts: 301
 

Default Re: Inserting Javascript into Template (used Literal tag)

Code:
<script language="JavaScript"> <!-- /* Random Image Script- By JavaScript Kit (http://www.javascriptkit.com) Over 400+ free JavaScripts here! Keep this notice intact please */ function random_imglink(){ldelim} var myimages=new Array() //specify random images below. You can have as many as you wish myimages[1]="{$ImagesDir}/ezbail.jpg" myimages[2]="{$ImagesDir}/swivelclamp.jpg" myimages[3]="{$ImagesDir}/speaker.jpg" alttext[1] = "text1"; alttext[2] = "text2"; alttext[3] = "text3"; var ry=Math.floor(Math.random()*myimages.length) if (ry==0) ry=1 document.write('<img src="'+myimages[ry]+'" alt="'+alttext[ry]+'">') {rdelim} random_imglink() //--> </script>
__________________
x-cart pro 4.0.18
linux
www.fabric8d.com (currently undergoing construction)
Reply With Quote