954,180 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Javascript not working in IE

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 errorWebpage 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
Newbie Poster
10 posts since Sep 2009
Reputation Points: 10
Solved Threads: 0
 

Jeyush,

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

Airshow
WiFi Lounge Lizard
Moderator
2,679 posts since Apr 2009
Reputation Points: 321
Solved Threads: 372
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You