Javascript Slide Show !!!!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ajinkya
    New Member
    • Nov 2007
    • 21

    Javascript Slide Show !!!!

    Hello ,
    Sir I want to do slide show with 10 images on index page , by using Javascript .
    I have 10 images, which are uploaded by user from Admin Pannel . There is 2 sec gap in between two images ..
    I dont have any Idea about it, please give me some idea !!!!!

    Ok !

    Bye !
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Try this slide show.

    Comment

    • Ajinkya
      New Member
      • Nov 2007
      • 21

      #3
      Hello !

      Sir , I meant to say that it was a smart way of anchoring images in a slideshow,

      But sir, I it was very long method(code) . I want simple method by using " setTimeout() " function with time delay of 5 sec .

      I hope you understand what I mean to say , and you reply me soon !!!! And thanks for this reference.

      Ok !

      Bye !!!!

      Comment

      • gits
        Recognized Expert Moderator Expert
        • May 2007
        • 5390

        #4
        hi ...

        so you have an idea! :) ... please post the code you have so far. you may use an array or object to store the image-source-references and then you may iterate through that list and change the src-attrib of an img-tag in your page ... but we should see what you have ... so that we know what the 'best' way would be for your purpose ..

        kind regards

        Comment

        • Ajinkya
          New Member
          • Nov 2007
          • 21

          #5
          Originally posted by gits
          hi ...

          so you have an idea! :) ... please post the code you have so far. you may use an array or object to store the image-source-references and then you may iterate through that list and change the src-attrib of an img-tag in your page ... but we should see what you have ... so that we know what the 'best' way would be for your purpose ..

          kind regards

          Hello , Gits !
          I dont have any Idea about this . Gits I give facility to user to store 10 images from admin. In front end I want to access them to show slide show !!!!

          Here for slide show , according to me to use function " setTimeout() " is very simple way . Gits I want a simple code to show slide show , which I remember easily , and use anywhere .

          Ok !

          Bye !!!!!!

          Comment

          • gits
            Recognized Expert Moderator Expert
            • May 2007
            • 5390

            #6
            hmmm ... ok have a look at the following simple example:

            [HTML]<script type="text/javascript">
            var images = [
            'http://www.thescripts. com/images/logo4.gif',
            'http://www.thescripts. com/images/noavatar.gif'
            ];

            var idx = 0;

            function img_rotator() {
            var container = document.getEle mentById('img_c ontainer');
            container.src = images[idx];
            idx++;

            if (idx == images.length) {
            idx = 0;
            }
            }

            function start_slide_sho w() {
            img_rotator();
            window.setInter val(img_rotator , 2000);
            }
            </script>
            <body onload="start_s lide_show();">
            <img id="img_contain er" src=""/>
            </body>
            [/HTML]
            but remember: this acts as an example ... you HAVE TO show what you have in case you need adaptions ... ok?

            kind regards

            Comment

            • Ajinkya
              New Member
              • Nov 2007
              • 21

              #7
              Hi !

              Gits, thanks for your code .

              Now I access it then I told you results ...

              Ok !

              Bye !

              Comment

              Working...