PDA

View Full Version : Trouble with Variable Slide Script using Nvu



redleg52
02-25-2008, 11:32 PM
1) Script Title: FlexiSlide

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/flexislide.htm

3) Describe problem: I am trying to add this script to my eBay descriptions. I am using Nvu as my editor. I cut the script and paste it into Nvu and I change the variables for size of the image and the images file locations. Nothing comes up but the DynamicDrive link at the bottom of the script.

I've used the image fade script in another situation in the past with success.

I've tried copying the script between the body or head tags with the same (actually no) result. There is absolutely nothing else on the source code page!

I'm no programmer but jeez I did not think I was this much of a dufus!

Any suggestion will be appreciated.

Thank you for looking.

thetestingsite
02-25-2008, 11:39 PM
Do you have a link to the problem page so that we can see what's going on?

redleg52
02-26-2008, 12:07 AM
I don;t have a URL as this is not published yet. Here is the "offending" code: :confused:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title></title>
</head>
<body>
<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://www.midiworlds.com/photos/pr_502.jpg', '', '']
variableslide[1]=['http://www.midiworlds.com/photos/pr_506.jpg', 'http://www.space.com', 'Has aliens landed on earth? You decide.']
variableslide[2]=['http://www.midiworlds.com/photos/pr_503.jpg', '', '']
//configure the below 3 variables to set the dimension/background color of the slideshow
var slidewidth='450' //set to width of LARGEST image in your slideshow
var slideheight='350px' //set to height of LARGEST iamge in your slideshow, plus any text description
var slidebgcolor='#F3F3F3'
//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="&amp;{slidewidth};"
height="&amp;{slideheight};" bgcolor="&amp;{slidebgcolor};"
visibility="hide"><layer id="slidenssub"
width="&amp;{slidewidth};" left="0" top="0"></layer></ilayer>
<p align="center"><font face="Arial" size="-2">Free
DHTML scripts provided by<br>
<a href="http://www.dynamicdrive.com">Dynamic Drive</a></font></p>
</body>
</html>