Results 1 to 2 of 2

Thread: displaying images

  1. #1

    Thread Starter
    Fanatic Member merhaba's Avatar
    Join Date
    Sep 2002
    Location
    Istanbul,Bartin-Gallipoli(Gelibolu-Canakkale)
    Posts
    601

    displaying images

    Hi,
    I just wanted to display all images ,one next to the other one each time I click the button..
    But I could not fix it...Hope you can help me out...
    thanks in advance
    -----------------------------

    <body>
    <script>
    var pic=new Array("","0154.gif","0174.gif","0184.gif","0190.gif","0189.gif","0199.gif")
    var con;
    con=0;
    function gox()
    {
    con++;
    document.room.src=pic[con];
    if(con==6)
    con=0;
    document.getElementById('ses').value=con+1;
    for(m=0;m<=6;m++)
    {
    document.room.src=pic[con];
    }
    }
    </script>
    <img src="" name="room" >
    <form>
    <input type="button" value="here we go" onclick="gox()">
    <input type="button" name="ses" value="">
    </form>
    </body>

  2. #2
    Fanatic Member
    Join Date
    Jan 2005
    Location
    Cebu
    Posts
    607

    Re: displaying images

    Code:
    <script>
    var pic=new Array("","IMGP0274.JPG","IMGP0275.JPG","IMGP0276.JPG","IMGP0277.JPG");
    var i=0;
    function gox(){
    	document.room.src=pic[i];
    	document.getElementById('ses').value=i;
    	i++;
    	if(i==5) i=0;
    }
    </script>
    
    <form>
    	<img src="" name="room"><p></p>
    	<input type="button" value="here we go" onclick="gox();">
    	<input type="button" value="" id="ses">
    </form>
    ?

Posting Permissions

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



Click Here to Expand Forum to Full Width