Results 1 to 1 of 1

Thread: I.E. error using php/mysql where clause and fadeinslideshow

  1. #1
    Join Date
    Jan 2010
    Location
    Tweed Heads, Australia
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default I.E. error using php/mysql where clause and fadeinslideshow

    1) Script Title: Ultimate Fade-in slideshow (v2.1)

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...nslideshow.htm


    3) Describe problem: I thought I'd post this just in case anyone else had the same problem getting images from a mysql database and finding it did not work in I.E. giving this error:

    get(...)complete is null or not an object fadeslideshow.js

    My guess is it is an overhead problem - taking too long to go through a where clause and finding a link to an image directory

    Code:
    	imagearray: [
    
    <?php
    
    include('linktodb.php');
    $query="SELECT * FROM database WHERE condition='met'";//this line caused the problem
    $result=mysql_query($query);
    
    
    
    while ($row=mysql_fetch_assoc($result)){
    
    
    $url=$row[url];
    $text=$row[text];
    $image=$row[image];
    {
    echo "['http://mydomain.com/images/$image','$url','', '$text'],\n\r";
    }
    }
    
    ?>
    ['http://mydomain.com/gifs/loading.GIF','contact.html','','some text here for contacting - just an example of text. <a href=\'contact.html\'>CONTACT US</a>']
    
    ],
    I replaced the above with
    Code:
    	imagearray: [
    
    <?php
    
    include('linktodb.php');
    $query="SELECT * FROM database";//this line no longer contains a where clause
    $result=mysql_query($query);
    
    
    
    while ($row=mysql_fetch_assoc($result)){
    
    
    $url=$row[url];
    $text=$row[text];
    $image=$row[image];
    $condtion=$row[condition];//this line and next added in place of Where clause
    if($condition=='met'{
    echo "['http://mydomain.com/images/$image','$url','', '$text'],\n\r";
    }
    }
    
    ?>//php tag ends
    //next line outside php tags and is last in the array as a convenience so comma is left out as required by script 
    ['http://mydomain.com/gifs/loading.GIF','contact.html','','some text here for contacting - just an example of text. <a href=\'contact.html\'>CONTACT US</a>']
    
    ],
    Hope this helps someone
    Last edited by jscheuer1; 03-06-2010 at 02:32 PM. Reason: typo

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
  •