I write javascript for image slide show.

var mygallery=new fadeSlideShow({
wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
dimensions: [380, 469], //width/height of gallery in pixels. Should reflect dimensions of largest image
imagearray: [
<?php $q2 = mysql_query("select * from home_flash");
$i = 0;
while($res = mysql_fetch_array($q2))
{
	$image[$i] 	= $res[1];
	$text[$i] 	= $res[2];
	$str = "['images/fla/".$image[$i]."','','','".$text[$i]."'],";
	echo $str;
	$i++; 
} ?>

//<--no trailing comma after very last image element!
],
displaymode: {type:'auto', pause:2500, cycles:0, wraparound:false},
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 500, //transition duration (milliseconds)
descreveal: "always",
togglerid: ""
})

In IE I got an error

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2)
Timestamp: Sat, 20 Mar 2010 06:22:10 UTC

Message: 'imagearray[...].0' is null or not an object
Line: 37
Char: 3
Code: 0

If you have solution for thi, then please help with it!

Thanks for your precious time.

Cheers!!

Jeyush,

More info needed.

  1. From which library is fadeSlideShow?
  2. Can you post the as-served javascript rather than the php source?
  3. At what stage do you get the javascript error; on page load or when the fader executes?
  4. You imply that the error only occurs in IE. Is this the case and if so, which version(s) of IE?

Airshow

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.