www.webdeveloper.com
Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 35

Thread: Rotating Images

  1. #16
    Join Date
    Mar 2003
    Posts
    8
    Thank you both sooooo much!

  2. #17
    Join Date
    Feb 2003
    Posts
    27
    Good luck with the pregancy and best wishes...let us know when you update the website

    Cheers

    Cham

  3. #18
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    Just for future note, I notice a little bug in the code, and have fixed it in this version:

    Code:
    <html> 
    <head> 
    <title>Untitled Document</title> 
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
    
    <script language="javascript" type="text/javascript"> 
    
    img2 = new Image() 
    
    
    seconds = "2"; 
    
    function imgOne() 
    { 
    document.myimg.src = 'http://devyne.org/Images/babyboy1.gif'; //needed to be added
    setTimeout("imgTwo()", seconds * 1000); 
    } 
    function imgTwo() 
    { 
    document.myimg.src = 'http://devyne.org/Images/E&B.jpg'; 
    setTimeout("imgThree()", seconds * 1000); 
    } 
    function imgThree() 
    { 
    document.myimg.src = 'http://devyne.org/family.gif'; 
    setTimeout("imgOne()", seconds * 1000); 
    } 
    </script> 
    
    </head> 
    
    <body onload="imgOne();"> 
    <img src="http://devyne.org/Images/babyboy1.gif" name="myimg"> 
    </body> 
    </head>

    Personal website http://www.ryanbrill.com/
    Business website: http://www.infinitywebdesign.com/
    TypeSpace http://www.typespace.org/

    I reject your reality and substitute it with my own!

  4. #19
    Join Date
    Dec 2005
    Posts
    2

    Pretty sweet script

    I just have one problem. I need to add multiple pics. I tried to add to what was there to do at least 15 pics. But once I refresh it hits the first pic, then second, and third but then it goes back to the second and third and just rotates between the second and third. Never see the first pic again or any of the others.

    Any help would be appreciated.

  5. #20
    Join Date
    Dec 2005
    Posts
    2
    Never mind...found it...thanks anyway

  6. #21
    Join Date
    Jun 2007
    Posts
    2

    rotate this

    these r old threads but if u guy r still out there, please lend a hand to a novice..

    my pics dont rotate. whats wrong with the code?


    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

    <script language="javascript" type="text/javascript">

    img2 = new Image()


    seconds = "2";

    function imgOne()
    {
    setTimeout("<img src="/wp/wp-content/themes/ksc4/photos/7-6-9-1.jpg", seconds * 1000);
    }
    function imgTwo()
    {
    document.myimg.src = 'wp/wp-content/themes/ksc4/photos/7-6-9-1.jpg'';
    setTimeout("/wp/wp-content/themes/ksc4/photos/7-6-9-2.jpg", seconds * 1000);
    }
    function imgThree()
    {
    document.myimg.src = 'wp/wp-content/themes/ksc4/photos/7-6-9-2.jpg'';
    setTimeout("/wp/wp-content/themes/ksc4/photos/7-6-9-3.jpg", seconds * 1000); }
    </script/>

    </script></meta></head>

    <body onload="/wp/wp-content/themes/ksc4/photos/7-6-9-1.jpg();">
    <img src="/wp/wp-content/themes/ksc4/photos/7-6-9-2.jpg" name="pic 2"/>
    </body>
    </html>






    Quote Originally Posted by pyro
    Try this code:

    Code:
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    
    <script language="javascript" type="text/javascript">
    
    img2 = new Image()
    
    
    seconds = "2";
    
    function imgOne()
    {
    	setTimeout("imgTwo()", seconds * 1000);
    }
    function imgTwo()
    {
    	document.myimg.src = 'two.gif';
    	setTimeout("imgThree()", seconds * 1000);
    }
    function imgThree()
    {
    	document.myimg.src = 'three.gif';
    	setTimeout("imgOne()", seconds * 1000);
    }
    </script>
    
    </head>
    
    <body onload="imgOne();">
    <img src="one.gif" name="myimg">
    </body>
    </html>

  7. #22
    Join Date
    Feb 2008
    Posts
    6

    rotating images

    This owrks great - Ive been looking for the same thing - is it possible to add a fade element to the images as they are changing -

  8. #23
    Join Date
    Jan 2007
    Posts
    196
    Just a simple suggestion:

    why not make an animated GIF with frame delay of your choice between pictures. You can add as many frames as you like and there will be the same delay.

  9. #24
    Join Date
    Feb 2008
    Posts
    1
    Is there a way to add captions to the bottom of the images with each image that appears? Also what attribute do I use to have the images fade?

    Thanks a lot,

    I appreciate it!


    Code:
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    
    <script language="javascript" type="text/javascript">
    
    img2 = new Image()
    
    
    seconds = "3.5";
    
    function imgOne()
    {
    document.myimg.src = 'http://www.mcgregorsfurniture.com/images/products/2CBTA4278RUSC.jpg'; //needed to be added
    setTimeout("imgTwo()", seconds * 1000);
    }
    function imgTwo()
    {
    document.myimg.src = 'http://www.mcgregorsfurniture.com/images/products/311911.jpg';
    setTimeout("imgThree()", seconds * 1000);
    }
    function imgThree()
    {
    document.myimg.src = 'http://www.mcgregorsfurniture.com/images/products/sd2605mc.jpg';
    setTimeout("imgOne()", seconds * 1000);
    }
    function imgFour()
    document.myimg.scr ="img4";
    setTimeout("imgFour()", seconds * 1000);
    }
    function imgFive()
    document.myimg.scr="img5";
    setTimeout("imgFive()", seconds * 1000);
    }
    </script>
    
    </head>
    
    <body onLoad="imgOne();">
    <img src="http://www.mcgregorsfurniture.com/images/products/sd2605mc.jpg" name="myimg">
    </body>
    </head>

  10. #25
    Join Date
    Jul 2010
    Posts
    1
    I know, I'm like 2 years behind, but how can I implement "Link Clicking" within this code. I was a different link to each picture that comes up. (Like an advertising Bar)

  11. #26
    Join Date
    Jul 2010
    Posts
    2
    Quote Originally Posted by pyro View Post
    Try this code:

    Code:
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    
    <script language="javascript" type="text/javascript">
    
    img2 = new Image()
    
    
    seconds = "2";
    
    function imgOne()
    {
    	setTimeout("imgTwo()", seconds * 1000);
    }
    function imgTwo()
    {
    	document.myimg.src = 'two.gif';
    	setTimeout("imgThree()", seconds * 1000);
    }
    function imgThree()
    {
    	document.myimg.src = 'three.gif';
    	setTimeout("imgOne()", seconds * 1000);
    }
    </script>
    
    </head>
    
    <body onload="imgOne();">
    <img src="one.gif" name="myimg">
    </body>
    </html>
    Hey Thanks : good code and it works . I am new in Java script please give me more code like this.

  12. #27
    Join Date
    May 2011
    Posts
    2

    Add rotating images to a table

    Hey all,

    I was looking for a script that could rotate images for me and found this forum. Is there anyway to have this script run inside the contents of a table cell? We want to have some pictures rotate on our home page (www.pgsd.org). The three pictures at the top are in a table. Will this code work?

  13. #28
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    Quote Originally Posted by grubbsy View Post
    Hey all,

    I was looking for a script that could rotate images for me and found this forum. Is there anyway to have this script run inside the contents of a table cell? We want to have some pictures rotate on our home page (www.pgsd.org). The three pictures at the top are in a table. Will this code work?
    Please, don't hijack the others' threads. Especially not the old ones. Create your own Thread (see the up-left button: New Thread). And created it into the JavaScript Forum, not here, as it is a JavaScript related problem.

  14. #29
    Join Date
    May 2011
    Posts
    2
    Kor, I was merely trying to get more information about the same topic using the same script. That is not hijacking.

    Last time I post here.

  15. #30
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    Quote Originally Posted by grubbsy View Post
    Last time I post here.
    As you wish. But remember that no matter which Forum you will enter, you'll encounter the same rules.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles