Results 1 to 6 of 6

Thread: dynamic slidshow from mysql

  1. #1
    Join Date
    May 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default dynamic slidshow from mysql

    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
    Last edited by jscheuer1; 05-08-2010 at 02:31 AM. Reason: format code

  2. #2
    Join Date
    May 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    no replay until now is that hard my question is ??!!

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Please post a link to a page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    May 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thank you for your replay
    this is the link i need to slidshow in the same place not show all images


    http://www.2worldshopping.com/test/slidshow.php

    i don't know where's the wrong
    i hope u can help me

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I see no Dynamic Drive script on that page. If I'm mistaken, let me know where it is, or give a link to your page that has a Dynamic Drive script on it.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    May 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thank you jscheuer1 i hope you can help me with this problem
    i submited all the code i have without th database is there any thing missing maybe it's the problem ??
    i waitting your solution
    thank you

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •