Topic awaiting preservation: Loop Problem (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: NZ |
posted 08-11-2003 01:20
Hi, guys. How are you? Did you have good week end? code: <html>
|
Paranoid (IV) Inmate From: NZ |
posted 08-11-2003 01:32
Hi, guys. |
Paranoid (IV) Inmate From: France |
posted 08-11-2003 11:14
Hiroki: You declared you counter i locally and reset it to 0 every time the cal() function is called. The user enters the good password or not and then you do what you have to. Nothing more, nothing less. So there's no need for a while(...) loop. You realise that the return instruction stops the exectution of a function, thus your counter will always be at 0 and the form1.time.value = i; statement will never be executed. code: var i=0; I beg your pardon if my questions offend you, but the way you code makes me wonder if you understand what you actually write and if you write all your functions in row and then test the whole thing praying that everything will work. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 08-11-2003 17:10
It also worries me that, as your code becomes more complex, the way in which you format it seems to get messier, and I wonder if that's linked to a possible lack of intuition about the way the language works. Perhaps, if you learn to indent your code better, it might actually improve your understanding of what you write. code: if (blahblahblah)
code: if (blahblahblah)
code: function blah()
code: function blah() {
code: function blah() {
|
Paranoid (IV) Inmate From: NZ |
posted 08-12-2003 01:30
Hi, Poi & Slime. |