473,657 Members | 2,474 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to repeat this code

How can I get this to repeat an infinite number of times?

Thanks

=============== ==
</head>

<body onload="startti mer()" onunload="stopt imer()">

<script type="text/javascript">
var i=1
function starttimer()
{
myimage.style.p osition="relati ve"
myimage.style.l eft=+i
i++
timer=setTimeou t("starttimer() ",12)
}

function stoptimer()
{
clearTimeout(ti mer)
}
</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
Jul 20 '05 #1
5 9597
While the city slept, Lasse Reichstein Nielsen <lr*@hotpop.com > feverishly
typed:
"George C" <to*@tom.net> writes:
How can I get this to repeat an infinite number of times?


It seems to work for me. What is the problem?


Considering the OP wants it to repeat to infinity, how can you possibly say
it works? ;-) Especially only a quarter of an hour after his post!

Cheers,
Nige

--
Nigel Moss.

Email address is not valid. ni***@nigenetDO G.org.uk. Take the dog out!
http://www.nigenet.org.uk | Boycott E$$O!! http://www.stopesso.com
"They got the mustard out!"
Jul 20 '05 #2
try this, will only work in IE though. Don't know if it's the best way to do
it, but modified the code you already had.

<body onload="startti mer()">

<script type="text/javascript">
loc = -209
var ws = document.body.c lientWidth;
function starttimer()
{
myimage.style.p osition="relati ve";
myimage.style.l eft=loc;
loc++;
if (loc > (ws))
{
loc = -209;
setTimeout("sta rttimer()",12)
}
else
{
setTimeout("sta rttimer()",12)
}
}
</script>
<p>

<img id="myimage" src="Images/housemove.gif" width="209" height="109"/>

Stu

"George C" <to*@tom.net> wrote in message
news:vg******** ****@corp.super news.com...
How can I get this to repeat an infinite number of times?

Thanks

=============== ==
</head>

<body onload="startti mer()" onunload="stopt imer()">

<script type="text/javascript">
var i=1
function starttimer()
{
myimage.style.p osition="relati ve"
myimage.style.l eft=+i
i++
timer=setTimeou t("starttimer() ",12)
}

function stoptimer()
{
clearTimeout(ti mer)
}
</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

Jul 20 '05 #3
While the city slept, Stuart Palmer <tr**********@y oucant.com> feverishly
typed:

[Top posting fixed]
"nice.guy.n ige" <ni********@dea dspam.com> wrote in message
news:bd******** ****@ID-112325.news.dfn cis.de...
Considering the OP wants it to repeat to infinity, how can you
possibly say it works? ;-) Especially only a quarter of an hour
after his post!

what he means is for the code that is written, it does work, it will
continue to move the image to the right indefinatly thus repeating
the move. He did not state what most of us assumed the the poster


I think you missed the humour in my post.

On a more serious note, please post according to the group's style, as can
be found in the FAQ's (posted to the group yesterday and available online at
http://www.jibbering.com/faq/).

Cheers,
Nige

--
Nigel Moss.

Email address is not valid. ni***@nigenetDO G.org.uk. Take the dog out!
http://www.nigenet.org.uk | Boycott E$$O!! http://www.stopesso.com
"They got the mustard out!"
Jul 20 '05 #4
Stuart, thank you for continuing to come up with a solution.
"Stuart Palmer" <tr**********@y oucant.com> wrote in message
news:bd******** **@sp15at20.hur sley.ibm.com...
what he means is for the code that is written, it does work, it will
continue to move the image to the right indefinatly thus repeating the move. He did not state what most of us assumed the the poster wanted to do and
repeat the scroll across the screen, it's just a different interpretation of the question, so all parties are correct here.

Stu

p.s I am looking into the solution.

"nice.guy.n ige" <ni********@dea dspam.com> wrote in message
news:bd******** ****@ID-112325.news.dfn cis.de...
While the city slept, Lasse Reichstein Nielsen <lr*@hotpop.com > feverishly typed:
"George C" <to*@tom.net> writes:

> How can I get this to repeat an infinite number of times?

It seems to work for me. What is the problem?


Considering the OP wants it to repeat to infinity, how can you possibly

say
it works? ;-) Especially only a quarter of an hour after his post!

Cheers,
Nige

--
Nigel Moss.

Email address is not valid. ni***@nigenetDO G.org.uk. Take the dog out!
http://www.nigenet.org.uk | Boycott E$$O!! http://www.stopesso.com
"They got the mustard out!"


---
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/23/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/23/2003
Jul 20 '05 #5
Works beautifully. Thank you Stuart for the help and common sense approach.

G

"Stuart Palmer" <tr**********@y oucant.com> wrote in message
news:sB******** *******@newsfep 3-gui.server.ntli .net...
try this, will only work in IE though. Don't know if it's the best way to do it, but modified the code you already had.

<body onload="startti mer()">

<script type="text/javascript">
loc = -209
var ws = document.body.c lientWidth;
function starttimer()
{
myimage.style.p osition="relati ve";
myimage.style.l eft=loc;
loc++;
if (loc > (ws))
{
loc = -209;
setTimeout("sta rttimer()",12)
}
else
{
setTimeout("sta rttimer()",12)
}
}
</script>
<p>

<img id="myimage" src="Images/housemove.gif" width="209" height="109"/>

Stu

"George C" <to*@tom.net> wrote in message
news:vg******** ****@corp.super news.com...
How can I get this to repeat an infinite number of times?

Thanks

=============== ==
</head>

<body onload="startti mer()" onunload="stopt imer()">

<script type="text/javascript">
var i=1
function starttimer()
{
myimage.style.p osition="relati ve"
myimage.style.l eft=+i
i++
timer=setTimeou t("starttimer() ",12)
}

function stoptimer()
{
clearTimeout(ti mer)
}
</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


---
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
Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
2647
by: duncan.lovett | last post by:
PHP 4 MySQL 4.0.20 DW MW 2004 7.01 This problem is giving me a bit of a headache, and I'm getting nowhere with it so thought I'd open it up to all, any help would be greatly appreciated. OVERVIEW --------
1
8242
kestrel
by: kestrel | last post by:
im using externl css, and i have a menu, and i want to add some css, thta will make an image repeat at the top of my page. i dont know how to sup into my html file, div or what ever. thanks heres wat i have: CSS:.buttonscontainer {width: 200px;} .buttons a {color: #FFFFFF; background-color: #202020; padding: 6px;
1
4333
by: roveagh1 | last post by:
Hi I've been using the 2 year old link below to repeat values from previous record field into current corresponding field. It's worked fine for text but the last piece of advice was to use the same logic for a date field. i.e. theValue.defaultvalue = "#" & theValue.value & "#" I can't get this to work for some reason and I can't figure out why. Can anyone out there help? Thanks Repeat value of previous record field into current...
1
2016
by: nicky77 | last post by:
hi there, i'm pretty inexperienced with CSS, so apologies for the shoddy coding. i'm trying to set a 3 column layout using different background images for each column. however, i have whitespace at the top and sides of the page, which i really want to get rid of. i've used nested divs to create the layout so hopefully i've set these up properly. the other problem i am having is that i want the images to repeat vertically to 100% of the page...
2
4805
XedinUnknown
by: XedinUnknown | last post by:
Hi! I am new to this forum, but not new to web design and programming. Nevertheless, I have never tried to use PNG so extensively in my pages. here's the problem. First, I have found that the PNG backgrounds and images had no transparency and grey around them when viewed in IE6, but I solved this bug using this hack. It works great, but then another problem came up: a background image that had the solution applied to was not repeating...
7
15388
by: cabman | last post by:
I'm having trouble with a page and getting the background image to repeat itself on the y-axis. Here is a sample of the code: div.main { background-image: url(backround_image.gif); background-repeat: repeat; margin: 0px; top: 100px; left: 100px; position: absolute; padding: 0px;
4
2910
by: shapper | last post by:
Hello, I am trying to give a background to a Div repeating it on the y direction. Please, notice the alternate of colors: http://www.27lamps.com/Beta/Background/Background.html Does anyone has any idea why is this happening?
0
1249
by: shapper | last post by:
On Sep 25, 1:56 am, shapper <mdmo...@gmail.comwrote: Sherm, Thank you to point that to me. I forgot to hide the gradient on Photoshop and I was all this time going around my CSS. Thank you both for your time. Miguel
9
5254
by: Mr Prister | last post by:
What I want to do (whether you can or not, I don't know) is: Repeat an image downwards... eg: .somedivisionname{ background: acolor url(apicture.filetype) repeat- center left; } By the way I know isn't a proper value. I also know you can use repeat-y but this repeats in both directions on the y axis, I want to repeat in just one!
0
8842
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8740
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8617
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7352
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2742
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.