Works beautifully. Thank you Stuart for the help and common sense approach.
G
"Stuart Palmer" <tryandspamme@youcant.com> wrote in message
news:sBiMa.761$Fz3.734@newsfep3-gui.server.ntli.net...[color=blue]
> try this, will only work in IE though. Don't know if it's the best way to[/color]
do[color=blue]
> it, but modified the code you already had.
>
> <body onload="starttimer()">
>
> <script type="text/javascript">
> loc = -209
> var ws = document.body.clientWidth;
> function starttimer()
> {
> myimage.style.position="relative";
> myimage.style.left=loc;
> loc++;
> if (loc > (ws))
> {
> loc = -209;
> setTimeout("starttimer()",12)
> }
> else
> {
> setTimeout("starttimer()",12)
> }
> }
> </script>
>
>
> <p>
>
> <img id="myimage" src="Images/housemove.gif" width="209" height="109"/>
>
> Stu
>
>
>
> "George C" <tom@tom.net> wrote in message
> news:vg1rs07eb36oc5@corp.supernews.com...[color=green]
> > How can I get this to repeat an infinite number of times?
> >
> > Thanks
> >
> > =================
> > </head>
> >
> > <body onload="starttimer()" onunload="stoptimer()">
> >
> > <script type="text/javascript">
> > var i=1
> > function starttimer()
> > {
> > myimage.style.position="relative"
> > myimage.style.left=+i
> > i++
> > timer=setTimeout("starttimer()",12)
> > }
> >
> > function stoptimer()
> > {
> > clearTimeout(timer)
> > }
> > </script>
> >
> >
> > <p>
> >
> > <img id="myimage" src="Images/housemove.gif" width="209" height="109"
> > loop="5" />
> >
> >
> > ---
> > I Cor. 10:31
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (
http://www.grisoft.com).
> > Version: 6.0.491 / Virus Database: 290 - Release Date: 6/22/2003
> >
> >[/color]
>
>[/color]
---
I Cor. 10:31
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
http://www.grisoft.com).
Version: 6.0.491 / Virus Database: 290 - Release Date: 6/24/2003
---
I Cor. 10:31
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
http://www.grisoft.com).
Version: 6.0.491 / Virus Database: 290 - Release Date: 6/24/2003