alternating pictures

Discussion in 'HTML' started by slinky, Aug 6, 2007.

  1. slinky

    slinky Guest

    I was a site that has alternating pictures on a timer of about 2
    seconds. Does anyone know how in HTML I can accomplish this? I looked
    at the code and all I coulf find was:
    <img src="http://www.lancer.com/photos/newphotos/c.gif" alt="Lancer
    Logo" width="105" height="139" border="0"></span><span
    style="background-color:
    #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
     
    slinky, Aug 6, 2007
    #1
    1. Advertising

  2. Scripsit slinky:

    > I was a site that has alternating pictures on a timer of about 2
    > seconds.


    Nasty, isn't it?

    > Does anyone know how in HTML I can accomplish this?


    Thank &Deity;, there is no way in HTML to do such things.

    > I looked
    > at the code and all I coulf find was:
    > <img src="http://www.lancer.com/photos/newphotos/c.gif" alt="Lancer
    > Logo" width="105" height="139" border="0"></span><span
    > style="background-color:
    > #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;


    So you saw a fragment of relatively clueless markup. Of course the
    alternating effect has been created with tools external to CSS, probably
    some piece of crappy JavaScript. Thanks for reminding me why disabling
    JavaScript is useful.

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Aug 6, 2007
    #2
    1. Advertising

  3. slinky

    Ben C Guest

    On 2007-08-06, Jukka K. Korpela <> wrote:
    > Scripsit slinky:
    >
    >> I was a site that has alternating pictures on a timer of about 2
    >> seconds.

    >
    > Nasty, isn't it?
    >
    >> Does anyone know how in HTML I can accomplish this?

    >
    > Thank &Deity;, there is no way in HTML to do such things.
    >
    >> I looked
    >> at the code and all I coulf find was:
    >> <img src="http://www.lancer.com/photos/newphotos/c.gif" alt="Lancer
    >> Logo" width="105" height="139" border="0"></span><span
    >> style="background-color:
    >> #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

    >
    > So you saw a fragment of relatively clueless markup. Of course the
    > alternating effect has been created with tools external to CSS, probably
    > some piece of crappy JavaScript. Thanks for reminding me why disabling
    > JavaScript is useful.


    It could also have been an animated gif.
     
    Ben C, Aug 6, 2007
    #3
  4. slinky

    Andy Dingley Guest

    On 6 Aug, 03:49, slinky <> wrote:
    > I was a site that has alternating pictures on a timer of about 2 seconds.


    A URL would have been helpful.

    > Does anyone know how in HTML I can accomplish this?


    You can't, at least not with plain HTML / CSS alone. You will need
    something else as well, although this could be very simple.

    If the image is "GIF friendly" (i.e. just a bit of graphic design
    flummery, not a photograph) then you could do this easily with an
    animated GIF. If it's only two images and a snap change (i.e. no slow
    morphing between them) then this is still quite a compact way to send
    it.

    If you want to use two reasonable quality photographs, i.e. using JPG
    images, then use JavaScript. It's a really simple example, I'm sure
    you can web search a suitable fragment. When you do this, make sure
    you code it in such a way that people without JavaScript see at least
    one image, or maybe both of them side-by-side.


    There are other techniques, but these two are the simple and sensible
    ones.
     
    Andy Dingley, Aug 6, 2007
    #4
  5. slinky

    Animesh K Guest

    Jukka K. Korpela wrote:
    > Scripsit slinky:
    >


    > So you saw a fragment of relatively clueless markup. Of course the
    > alternating effect has been created with tools external to CSS, probably
    > some piece of crappy JavaScript. Thanks for reminding me why disabling
    > JavaScript is useful.
    >


    Oh it's just an animated gif. And you can disable that too, in firefox
    or IE :)
     
    Animesh K, Aug 6, 2007
    #5
  6. slinky

    slinky Guest

    http://www.jfklancer.com/index.html was where I saw the pictures.
    Thanks!

    > A URL would have been helpful.
    >
    > > Does anyone know how in HTML I can accomplish this?

    >
    > You can't, at least not with plain HTML / CSS alone. You will need
    > something else as well, although this could be very simple.
    >
    > If the image is "GIF friendly" (i.e. just a bit of graphic design
    > flummery, not a photograph) then you could do this easily with an
    > animated GIF. If it's only two images and a snap change (i.e. no slow
    > morphing between them) then this is still quite a compact way to send
    > it.
    >
    > If you want to use two reasonable quality photographs, i.e. using JPG
    > images, then use JavaScript. It's a really simple example, I'm sure
    > you can web search a suitable fragment. When you do this, make sure
    > you code it in such a way that people without JavaScript see at least
    > one image, or maybe both of them side-by-side.
    >
    > There are other techniques, but these two are the simple and sensible
    > ones.
     
    slinky, Aug 7, 2007
    #6
  7. slinky

    John Hosking Guest

    slinky wrote:
    > http://www.jfklancer.com/index.html was where I saw the pictures.
    > Thanks!


    (In future, please don't top-post.)

    The fact that this technique appears on that page is reason enough to
    avoid using it. In fact, if you ever have code that resembles any part
    of that site's source, change your code.


    --
    John
    Pondering the value of the UIP: http://blinkynet.net/comp/uip5.html
     
    John Hosking, Aug 7, 2007
    #7
  8. slinky

    Don And Sis Guest

    Here is the code. each picture is on a seperate page with the code.

    his part is your timer

    <META HTTP-EQUIV=
    "Refresh"Content="15;URL=http://url of the next page
    here"><link rel="next"
    href="http://url of the next pic or slide here">

    There is no javasript here.


    <html>
    <title>Slide Show</title>
    <p>
    <head>
    <META HTTP-EQUIV=
    "Refresh"Content="15;URL=http://url of the next page
    here"><link rel="next"
    href="http://url of the next pic or slide here"> </head>
    <p>
    <body bgcolor="000000">
    <p>
    <br>
    <center>
    <table bgcolor="darkred" border="4"
    width="450" height="325"> <TR
    bgcolor="black">
    <TD align="center">
    <img
    src="http://url of the pic or slide here" height="325"
    width="450">
    </tr></td>
    </table>
    </center>
    <p>
    </body>
    </html>

    Don
     
    Don And Sis, Aug 7, 2007
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lydia Shawn
    Replies:
    2
    Views:
    7,649
    Sam Holden
    Aug 10, 2003
  2. Eirik Eldorsen
    Replies:
    1
    Views:
    615
    Eliyahu Goldin
    Nov 21, 2004
  3. Rob
    Replies:
    4
    Views:
    5,639
    mayank1987
    Mar 10, 2011
  4. MattC
    Replies:
    0
    Views:
    1,597
    MattC
    Mar 22, 2005
  5. Martin Raychev
    Replies:
    1
    Views:
    289
    Alvin Bruney [MVP]
    Mar 2, 2004
Loading...

Share This Page