![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Tom Hanser wrote: I keep getting the word "undefined" displayed instead of the intended text in the up-scrolling animated script located in the upper-left hand corner of this work-in-progress: http://www.marymoorvelodrome.org/new%5Fsite/index.html Can anyone tell me what causes this? If I hit refresh, my intended text comes back. Then, "undefined" appears, and repeats indefinitely. It looks like it's getting confused by the fact you only have two scrolling messages, and it's going past the end. Try replacing all occurances of: if (i==messages.length-1) with: if (i>=messages.length-1) I don't promise it'll work though - it's obviously designed to have more messages. -- Safalra (Stephen Morley) http://www.safalra.com/programming/javascript/ |
#3
| |||
| |||
|
|
Tom Hanser wrote: I keep getting the word "undefined" displayed instead of the intended text in the up-scrolling animated script located in the upper-left hand corner of this work-in-progress: http://www.marymoorvelodrome.org/new%5Fsite/index.html Can anyone tell me what causes this? If I hit refresh, my intended text comes back. Then, "undefined" appears, and repeats indefinitely. It looks like it's getting confused by the fact you only have two scrolling messages, and it's going past the end. Try replacing all occurances of: if (i==messages.length-1) with: if (i>=messages.length-1) I don't promise it'll work though - it's obviously designed to have more messages. -- Safalra (Stephen Morley) http://www.safalra.com/programming/javascript/ |
#4
| |||
| |||
|
|
Tom Hanser wrote: "Safalra" <usenet (AT) safalra (DOT) com> wrote in message news:1113296871.860594.73150 (AT) l41g2000cwc (DOT) googlegroups.com... Tom Hanser wrote: I keep getting the word "undefined" displayed instead of the intended text [...] in this work-in-progress: http://www.marymoorvelodrome.org/new%5Fsite/index.html [snip] Try replacing all occurances of: if (i==messages.length-1) with: if (i>=messages.length-1) Well, that did it! Fixed! Now if only all programmers would learn to use the correct termination-conditions... [dreams of a world with well-named variables, documentation, buffer overrun checks...] -- Safalra (Stephen Morley) http://www.safalra.com/programming/javascript/ |
![]() |
| Thread Tools | |
| Display Modes | |
| |