1) Script Title:
3) Describe problem: 1) Script Title: dynamic slideshow
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...nslideshow.htm
3) Describe problem:hi everyone i want to select last 10 image added to database and slid it by javascript in slidshow i made the selection and collect the last 10 paths from DB and put it in array now i want to make slideshow by javascript
can anyone help me with that i'll be thankful
this is the code i made it by some modify in the slidshow script
Code:<?php include("config.php"); $q=mysql_query ("select Car_pic from car order by Car_id desc LIMIT 10") or trigger_error(mysql_error(),E_USER_ERROR); $newarray=array(); $i=0; while($row=mysql_fetch_assoc($q)) { $newarray[]=$row[Car_pic]; } for ($i=0;$i<=10;$i++) echo $newarray[$i]; ?> <style type="text/css"> div#container { width: 616px; position: relative; margin-top: 0px; margin-left: auto; margin-right: auto; text-align: left; } </style> <style type="text/css"> body { text-align: center; margin: 0; background-color: #FFFFFF; color: #000000; } </style> <script type="text/javascript"> <!-- function FadeImage(id, duration) { var millisec = Math.round(duration / 100); var timer = 0; for(i = 0; i <= 100; i++) { setTimeout("SetOpacity('" + id + "'," + i + ")",(timer * millisec)); timer++; } } function SetOpacity(id, opacity) { var element = document.getElementById(id).style; element.opacity = (opacity / 100); element.MozOpacity = (opacity / 100); element.KhtmlOpacity = (opacity / 100); element.filter = "alpha(opacity=" + opacity + ")"; } //--> </script> <script type="text/javascript"> <!-- // --> </script> <style type="text/css"> a:active { color: #0000FF; } </style> </head> <body> <script type="text/javascript"> <!-- var SlideShow1_Index = -1; var SlideShow1_Images = new Array(); for(int i=0;i<=10;i++){ SlideShow1_Images[i] = image[i]; } function SlideShow1ShowNext() { SlideShow1_Index = SlideShow1_Index + 1; if (SlideShow1_Index > 2) SlideShow1_Index = 0; document.getElementById('SlideShow1_Fade').src = document.getElementById('SlideShow1').src; SetOpacity('SlideShow1', 0); eval("document.SlideShow1.src = SlideShow1_Images[" + SlideShow1_Index + "][0]"); setTimeout("SlideShow1ShowNext();", 2000); FadeImage('SlideShow1', 1500); } // --> </script> <img src="images/.jpg" style="position:absolute;left:0px;top:0px;" id="SlideShow1_Fade" border="0" align="top" alt="" width="562" height="444" name="SlideShow1_Fade"> <img src="images/.jpg" style="position:absolute;left:0px;top:0px;" id="SlideShow1" border="0" align="top" alt="" width="562" height="444" name="SlideShow1"> <script type="text/javascript"> <!-- SlideShow1ShowNext(); // --> </script> </div> <div id="wb_SlideShow2" style="position:absolute;left:318px;top:395px;width:0px;height:0px;z-index:3;overflow:hidden" align="left"> </div> </div> </body> </html>
where is the problem and what should i do
thank you a



Reply With Quote


Bookmarks