I have been trying to create a page with a slideshow using a java script I found on Dynamic Drive but I have run into a problem. The slideshow does not appear at all on the page. The input format is full html so I think I have done that much right. To test the script, I created a test html page with the same script and everything works perfectly. However, for some reason, the same does not happen on my drupal site. I have attached the test page I created for reference. Can someone shed some light on why this is occurring? Any help would be greatly appreciated.

CommentFileSizeAuthor
test.txt3.15 KBmarciaj

Comments

marciaj’s picture

Priority: Normal » Critical

I have tried also to create the page in version 5 of Drupal and was successful.

ainigma32’s picture

Status: Active » Fixed

The Full HTML input filter is mangling your script. You can solve this by using the PHP filter:


$out = <<<EOF
</br>
</br>
<p><h2>Welcome to the Faculty of Information Graduate Student Conference</h2></p>
<align="right">
<script language="JavaScript1.2">

/***********************************************
* Flexi Slideshow- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var variableslide=new Array()

//variableslide[x]=["path to image", "OPTIONAL link for image", "OPTIONAL text description (supports HTML tags)"]

variableslide[0]=['http://housingmemory.ischool.utoronto.ca/sites/default/files/images/show1.png']
variableslide[1]=['http://housingmemory.ischool.utoronto.ca/sites/default/files/images/show2.png']
variableslide[2]=['http://housingmemory.ischool.utoronto.ca/sites/default/files/images/show3.png']
variableslide[3]=['http://housingmemory.ischool.utoronto.ca/sites/default/files/images/show4.png']
variableslide[4]=['http://housingmemory.ischool.utoronto.ca/sites/default/files/images/show5.png']
variableslide[5]=['http://housingmemory.ischool.utoronto.ca/sites/default/files/images/show6.png']

//configure the below 3 variables to set the dimension/background color of the slideshow

var slidewidth='519px' //set to width of LARGEST image in your slideshow
var slideheight='507px' //set to height of LARGEST image in your slideshow, plus any text description
var slidebgcolor='#FFFFFF'

//configure the below variable to determine the delay between image rotations (in miliseconds)
var slidedelay=3000

////Do not edit pass this line////////////////

var ie=document.all
var dom=document.getElementById

for (i=0;i<variableslide.length;i++){
var cacheimage=new Image()
cacheimage.src=variableslide[i][0]
}

var currentslide=0

function rotateimages(){
contentcontainer='<center>'
if (variableslide[currentslide][1]!="")
contentcontainer+='<a href="'+variableslide[currentslide][1]+'">'
contentcontainer+='<img src="'+variableslide[currentslide][0]+'" border="0" vspace="3">'
if (variableslide[currentslide][1]!="")
contentcontainer+='</a>'
contentcontainer+='</center>'
if (variableslide[currentslide][2]!="")
contentcontainer+=variableslide[currentslide][2]

if (document.layers){
crossrotateobj.document.write(contentcontainer)
crossrotateobj.document.close()
}
else if (ie||dom)
crossrotateobj.innerHTML=contentcontainer
if (currentslide==variableslide.length-1) currentslide=0
else currentslide++
setTimeout("rotateimages()",slidedelay)
}

if (ie||dom)
document.write('<div id="slidedom" style="width:'+slidewidth+';height:'+slideheight+'; background-color:'+slidebgcolor+'"></div>')

function start_slider(){
crossrotateobj=dom? document.getElementById("slidedom") : ie? document.all.slidedom : document.slidensmain.document.slidenssub
if (document.layers)
document.slidensmain.visibility="show"
rotateimages()
}

if (ie||dom)
start_slider()
else if (document.layers)
window.onload=start_slider

</script>

<ilayer id="slidensmain" width=&{slidewidth}; height=&{slideheight}; bgColor=&{slidebgcolor}; visibility=hide><layer id="slidenssub" width=&{slidewidth}; left=0 top=0></layer></ilayer>
EOF;

echo $out;

- Arie

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.