Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > alternating pictures

Reply
Thread Tools

alternating pictures

 
 
slinky
Guest
Posts: n/a
 
      08-06-2007
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;

 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      08-06-2007
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/

 
Reply With Quote
 
 
 
 
Ben C
Guest
Posts: n/a
 
      08-06-2007
On 2007-08-06, Jukka K. Korpela <(E-Mail Removed)> 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.
 
Reply With Quote
 
Andy Dingley
Guest
Posts: n/a
 
      08-06-2007
On 6 Aug, 03:49, slinky <(E-Mail Removed)> 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.

 
Reply With Quote
 
Animesh K
Guest
Posts: n/a
 
      08-06-2007
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
 
Reply With Quote
 
slinky
Guest
Posts: n/a
 
      08-06-2007
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.



 
Reply With Quote
 
John Hosking
Guest
Posts: n/a
 
      08-07-2007
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
 
Reply With Quote
 
Don And Sis
Guest
Posts: n/a
 
      08-07-2007
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Alternating Item Style in a ListBox Rob ASP .Net 4 03-10-2011 10:02 AM
Alternating Item Style "ForeColor" not working in Template Column =?Utf-8?B?TWF4IFdlZWJsZXI=?= ASP .Net 9 10-27-2005 06:06 PM
Colorize Rows in DataGrid other than alternating MattC ASP .Net 0 03-22-2005 09:31 AM
alternating item bgcolor in datalist with 2 columns Eirik Eldorsen ASP .Net 1 11-21-2004 08:24 AM
extract strings between alternating text Lydia Shawn Perl 2 08-10-2003 10:01 AM



Advertisments