Announcement

Collapse
No announcement yet.

Autoplay slideshow

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Autoplay slideshow

    Hey, I'm stuck with this slideshow. It comes up nicely. But you have to click "start" to make it go through the images. Here is the code:

    <script type="text/javascript">
    // Script Author: ricocheting.com
    // Description: Slideshow that allows visitors to flip through a series of photos on your website

    var x=0;

    function rotate(num){
    sl=document.slide_form.slide;
    x=num%sl.length;
    if(x<0){x=sl.length-1};
    document.images.show.src=sl.options[x].value;
    sl.selectedIndex=x;}

    function auto() {
    if(document.slide_form.slidebutton.value == "Stop"){
    rotate(++x);window.setTimeout("auto()", 5000);}}
    </script>

    <form name="slide_form">
    <table cellpadding="3" style="border:1px black solid;border-collapse:collapse;">
    <tr><th align=center>Testing Slideshow!</th></tr>

    <tr><td align=center>
    <img src="http://www.idiomsbykids.com/taylor/mrtaylor/class20022003/idioms/idioms2003/idioms3/number%20one.jpg" name="show">
    </td></tr>

    <tr><td align=center style="border:1px black solid;">
    <select name="slide" onChange="rotate(this.selectedIndex);">
    <option value="http://www.idiomsbykids.com/taylor/mrtaylor/class20022003/idioms/idioms2003/idioms3/number%20one.jpg" selected>A image of a number one</option>
    <option value="http://animalblawg.files.wordpress.com/2009/03/number-21.jpg">An image od a number two</option>
    </select>
    </td></tr>

    <tr><td align=center style="border:1px black solid;">
    <input type=button onclick="rotate(0);" value="ll&lt;&lt;" title="Jump to beginning">
    <input type=button onclick="rotate(x-1);" value="&lt;&lt;" title="Last Picture">
    <input type=button name="slidebutton" onClick="this.value=((this.value=='Stop')?'Start': 'Stop');auto();" value="Start" title="Autoplay" style="width:75px;">
    <input type=button onclick="rotate(x+1);" value="&gt;&gt;" title="Next Picture">
    <input type=button onclick="rotate(this.form.slide.length-1);" value="&gt;&gt;ll" title="Jump to end">
    </td></tr></table></form>

    So I just want to make it plays automatically. Thanks!

Search

Collapse

Sponsor

Collapse

Incredible Stock

Latest Topics

Collapse

  • B
    Reply to 100% cotton t-shirt printing INK HELP
    B
    Are you referring to inkjet heat transfer printers and paper?...
    Today, 12:48 AM
  • B
    Reply to IT book cover redesign. Giving it a try
    B
    As someone who sometimes designs book covers, a realistic design needs to consider the sales brought on by shelf appeal. And shelf appeal doesn't just depend on aesthetics; it also depends on grabbing...
    Today, 12:34 AM
  • Kdigennaro
    Reply to Feedback for a poster design
    Kdigennaro
    I like that you are answering the 'why' questions. Why is the text background red, why are you using the crumbled paper texture etc.

    This shows that you are thinking threw what you are doing...
    Yesterday, 08:38 PM
  • Kdigennaro
    What - If any - Certifications are taken seriously these days?
    Kdigennaro
    Hey guys,

    I have been designing for about 10 years now as a freelancer and am entertaining the idea of trying to find a job at a creative firm. Right now I'm building my resume and portfolio...
    Yesterday, 07:30 PM
  • Kdigennaro
    Reply to Business card logo feedback
    Kdigennaro
    Hey @someguy,

    Thanks for sharing your designs! I would encourage and challenge you to try to narrow your design focus. Right now none of the designs are 'bad' but none are 'good'. Design,...
    Yesterday, 07:10 PM
GDF A division of Mediabistro Holdings Adweek | Mediabistro | Clio | Film Expo Group Contact Us | Terms of Use | Privacy Policy Copyright 2016 Mediabistro Holdings
Working...
X