pls help on my javascript slide show

ehloy_6997

New Member
Messages
1
Reaction score
0
Points
0
newbie here. pls help me what is wrong with my script? how come no image display on my table. appreciate for any help.

here is my site: builders.x10.mx
here is my code:

<html>
<head>
<script language=javascript>
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
}

function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

var newwindow = '';

function popitup(url) {
if (!newwindow.closed && newwindow.location) {
newwindow.location.href = url;
}
else {
newwindow=window.open(url,'name','height=500,width=500');;;
if (!newwindow.opener) newwindow.opener = self;
}
if (window.focus) {newwindow.focus()}
return false;
}
//-->
</script>

<link href="metaphil.css" rel="stylesheet" type="text/css">
<link href="date.css" rel="stylesheet" type="text/css">
<style type="text/css">
a { text-decoration:none }
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">
<!--
body,td,th {
font-family: Tahoma, Geneva, sans-serif;
font-size: 12px;
color: #000;
}
a:link {
text-decoration: none;
color: #D8B01D;
}
a:visited {
text-decoration: none;
color: #D8B01B;
}
a:hover {
text-decoration: underline;
color: #00F;
}
a:active {
text-decoration: none;
}
.imtable {
border-top-width: thin;
border-right-width: thin;
border-bottom-width: thin;
border-left-width: thin;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: none;
border-left-style: solid;
border-top-color: #D9B018;
border-right-color: #D9B018;
border-bottom-color: #D9B018;
border-left-color: #D9B018;
}
-->
</style></head>


<font face = "tahoma" size = 1>
<body link = "white" vlink = "white" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="600" height="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor = "black">
<tr bgcolor = "#CC9900">

<td width="729" align="right" valign="top"><table width="600" border="0" align="center" cellpadding="0" cellspacing="0" id="body" bgcolor = "black">
<tr>
<td width="686" align="left" valign="top" bgcolor="b0a67a"><table width="700" height="270" border="0" align="center" cellpadding="0" cellspacing="0" name = "ehloydisplay">

<tr>
<td width="573" height="382" align="center" valign="middle" bgcolor="#000000" class="imtable"><script language="JavaScript1.2" type="text/javascript">

var slideshow_width='673px' //SET IMAGE WIDTH
var slideshow_height='382px' //SET IMAGE HEIGHT
var pause=2000 //SET PAUSE BETWEEN SLIDE (3000=3 seconds)

var fadeimages=new Array()
//SET 1) IMAGE PATHS, 2) optional link, 3), optional link target:
fadeimages[0]=["imgs/photos/01.jpg", "", ""] //plain image syntax
.
.
.
fadeimages[61]=["imgs/photos/62.jpg", "", ""]
fadeimages[62]=["imgs/photos/63.jpg", "", ""]




var preloadedimages=new Array()
for (p=0;p<fadeimages.length;p++){
preloadedimages[p]=new Image()
preloadedimages[p].src=fadeimages[p][0]
}

var ie4=document.all
var dom=document.getElementById

if (ie4||dom)
document.write('<div style="position:relative;width:'+slideshow_width+';height:'+slideshow_height+';overflow:hidden"><div id="canvas0" style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';top:0;left:0;filter:alpha(opacity=10);-moz-opacity:10"></div><div id="canvas1" style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';top:0;left:0;filter:alpha(opacity=10);-moz-opacity:10;visibility: hidden"></div></div>')
else
document.write('<img name="defaultslide" src="'+fadeimages[0][0]+'">')

var curpos=30
var degree=30
var curcanvas="canvas0"
var curimageindex=0
var nextimageindex=1

function fadepic(){
if (curpos<100){
curpos+=30
if (tempobj.filters)
tempobj.filters.alpha.opacity=curpos
else if (tempobj.style.MozOpacity)
tempobj.style.MozOpacity=curpos/101
}
else{
clearInterval(dropslide)
nextcanvas=(curcanvas=="canvas0")? "canvas0" : "canvas1"
tempobj=ie4? eval("document.all."+nextcanvas) : document.getElementById(nextcanvas)
tempobj.innerHTML=insertimage(nextimageindex)
nextimageindex=(nextimageindex<fadeimages.length-1)? nextimageindex+1 : 0
var tempobj2=ie4? eval("document.all."+nextcanvas) : document.getElementById(nextcanvas)
tempobj2.style.visibility="hidden"
setTimeout("rotateimage()",pause)
}
}

function insertimage(i){
var tempcontainer=fadeimages[1]!=""? '<a href="'+fadeimages[1]+'" target="'+fadeimages[2]+'">' : ""
tempcontainer+='<img src="'+fadeimages[0]+'" border="0">'
tempcontainer=fadeimages[1]!=""? tempcontainer+'</a>' : tempcontainer
return tempcontainer
}

function rotateimage(){
if (ie4||dom){
resetit(curcanvas)
var crossobj=tempobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
crossobj.style.zIndex++
tempobj.style.visibility="visible"
var temp='setInterval("fadepic()",50)'
dropslide=eval(temp)
curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0"
}
else
document.images.defaultslide.src=fadeimages[curimageindex][0]
curimageindex=(curimageindex<fadeimages.length-1)? curimageindex+1 : 0
}

function resetit(what){
curpos=30
var crossobj=ie4? eval("document.all."+what) : document.getElementById(what)
if (crossobj.filters)
crossobj.filters.alpha.opacity=curpos
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=curpos/101
}

function startit(){
var crossobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
crossobj.innerHTML=insertimage(curimageindex)
rotateimage()
}

if (ie4||dom)
window.onload=startit
else
setInterval("rotateimage()",pause)

</script> </td>
 

lemon-tree

x10 Minion
Community Support
Messages
1,420
Reaction score
46
Points
48
A few things:
1: Wrap the code in
Code:
 or [HTML] tags, this makes it incredibly more simple to read and diagnose.
2: Is your browser returning any errors or do you have a live version of this script that we can test for errors e.g Safari will usually tell you where the parse error or runtime errors occur and what may have gone wrong.
3. Tables are not designed for this sort of use, they are intended strictly for showing lists of data.
 
Top