Results 1 to 2 of 2

Thread: random slideshow

  1. #1
    Join Date
    Mar 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default random slideshow

    I am using this code

    <!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=utf-8" />
    <meta name="generator" content="Adobe GoLive" />
    <title>Untitled Page</title><style type="text/css">

    .flashclass{ /*sample CSS class added to image slideshow container*/
    width: 700px; /*a width should be defined for transition to work*/
    border: 0px solid orange;
    padding: 0px;
    }

    .flashclass img{
    border-width: 0;
    }

    </style>

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




    </script>
    </head>

    <body>
    <p><script type="text/javascript">

    var flashyshow=new flashyslideshow({ //create instance of slideshow
    wrapperid: "myslideshow", //unique ID for this slideshow
    wrapperclass: "flashclass", //desired CSS class for this slideshow
    imagearray: [
    ["http://www.prestigedentalproducts.com/images/homslidshow/nordentinstrenew.jpg", "http://www.prestigedentalproducts.com", "_new", ""],
    ["http://www.prestigedentalproducts.com/images/homslidshow/tuttnauer.jpg", "http://www.prestigedentalproducts.com", "_new", ""],
    ["http://www.prestigedentalproducts.com/images/homslidshow/vonflex.jpg", "http://www.prestigedentalproducts.com", "_new", ""],
    ["http://www.prestigedentalproducts.com/images/homslidshow/x-pod%20copy.jpg", "http://www.prestigedentalproducts.com", "_new", ""]
    ],
    pause: 2000, //pause between content change (millisec)
    transduration: 1000 //duration of transition (affects only IE users)
    })

    </script></p>
    </body>

    </html>


    How can I mack this random so when refrash the page it will display a new image

  2. #2
    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

    Code:
    <script type="text/javascript">
    
    var flashyshow=new flashyslideshow({ //create instance of slideshow
    wrapperid: "myslideshow", //unique ID for this slideshow
    wrapperclass: "flashclass", //desired CSS class for this slideshow
    imagearray: (function(){ return [
    ["http://www.prestigedentalproducts.com/images/homslidshow/nordentinstrenew.jpg", "http://www.prestigedentalproducts.com", "_new", ""],
    ["http://www.prestigedentalproducts.com/images/homslidshow/tuttnauer.jpg", "http://www.prestigedentalproducts.com", "_new", ""],
    ["http://www.prestigedentalproducts.com/images/homslidshow/vonflex.jpg", "http://www.prestigedentalproducts.com", "_new", ""],
    ["http://www.prestigedentalproducts.com/images/homslidshow/x-pod%20copy.jpg", "http://www.prestigedentalproducts.com", "_new", ""]
    ].sort(function(){return 0.5 - Math.random();});})(),
    pause: 2000, //pause between content change (millisec)
    transduration: 1000 //duration of transition (affects only IE users)
    })
    
    </script>
    - John
    ________________________

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

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
  •