PDA

View Full Version : repeat a script



cwl157
Nov 22nd, 2003, 02:46 PM
I want this script to start when the page loads and then just keep repeating. So when the page loads it will say eamuscatuli and then switch to lets go cubs and then go back to eamuscatuli and just keep repeating this pattern. Here is the code:

<script>
setTimeout("document.a.c.value='lets go cubs'",300)
</script>
<form name="a">
<input type="button" name="c" size="12" value="eamuscatuli">
</form>

Willy Duitt
Nov 22nd, 2003, 08:00 PM
Try this:


<script>
setInterval("document.a.c.value='lets go cubs'",300)
setInterval("document.a.c.value='eamuscatuli'",300)
</script>
<form name="a">
<input type="button" name="c" size="12" value="eamuscatuli">
</form>

.....Willy

cwl157
Nov 24th, 2003, 10:24 PM
Thanks dude, that is exactly what i was looking for. Do you know how to make the text size bigger?
Thanks

Willy Duitt
Nov 24th, 2003, 11:12 PM
Try this:

<script type="text/javascript">
setInterval("document.getElementById('txt').innerHTML='lets go cubs'",1000)
setInterval("document.getElementById('txt').innerHTML='eamuscatuli'",1000)
</script>
<center>
<font size="7" color="#FF0000">
<span ID="txt">eamuscatuli</span>
</font>
</center>

.....Willy

cwl157
Nov 25th, 2003, 01:41 AM
Yet again,
you gave me a great script. Thanks a lot dude.