PDA

View Full Version : Ultimate Fade-in slideshow (v2.4)



KashifMunir
11-28-2010, 11:18 AM
1) Script Title: Ultimade Slide Show

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

3) Describe problem: Hello. I am a Little Developer. I added the Fadeslide show script in my page. i have a problem its working in ggogle chrome and firefox. but not working in internet explorer.

here is my page code:

<?php
require_once('connections/connection.php');

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Slide Show</title>

<script type="text/javascript" src="js/jquery.min.js"></script>

<script type="text/javascript" src="js/fadeslideshow.js">

/***********************************************
* Ultimate Fade In Slideshow v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/

</script>

<script type="text/javascript">

var mygallery=new fadeSlideShow({
wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
dimensions: [250, 180], //width/height of gallery in pixels. Should reflect dimensions of largest image

imagearray: [
<?php
$Query="select * from gallery_photos Order By photo_id DESC limit 0, 25";
$result=mysql_query($Query) or die (mysql_error());
$Num=mysql_numrows($result);
$Count=0;
while($Count < $Num){
$PHOT=mysql_result($result,$Count,"photo_filename");
$CAPTION=mysql_result($result,$Count,"photo_caption");


echo '["photos/'.$PHOT.'","","","'.$CAPTION.'"],';

$Count++;
}
?>
],
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: "ondemand",
togglerid: ""
})




</script>
</head>
<body>

<div id="fadeshow1"></div>

</body>
</html>

Can any one solve this problem???

KashifMunir
11-28-2010, 12:28 PM
Java script error

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; AskTbUT2V5/5.9.1.14019)
Timestamp: Sun, 28 Nov 2010 12:25:54 UTC


Message: 'imagearray[...].0' is null or not an object
Line: 38
Char: 3
Code: 0
URI: http://pnninews.com.pk/urdu_site/js/fadeslideshow.js

KashifMunir
11-28-2010, 03:31 PM
my web page is
www.pnninews.com.pk/urdu_site

jscheuer1
11-28-2010, 03:58 PM
You can't have a comma after the last entry in javascript for an array or an object for IE (all others now error correct for this, it's still a technical syntax error). My PHP isn't the best, but I'd try:


<?php
$Query="select * from gallery_photos Order By photo_id DESC limit 0, 25";
$result=mysql_query($Query) or die (mysql_error());
$Num=mysql_numrows($result);
$Count=0;
while($Count < $Num){
$PHOT=mysql_result($result,$Count,"photo_filename");
$CAPTION=mysql_result($result,$Count,"photo_caption");


echo '["photos/'.$PHOT.'","","","'.$CAPTION.'"]';

if(++$Count < $Num){
echo ',';
}
}
?>

KashifMunir
11-28-2010, 04:00 PM
Thank you so much sir, i was already done that. but you give me a better solution.

so nice of you sir

Kashif Munir