J
jab3
Does JavaScript have "static" variables. That is, as in C (or local in
Perl)? How can I keep a variable in a JavaScript function that doesn't
change from call to call? It may not make sense in JavaScript; I'm not
sure when the variables are re-set, but I assume it's at each page full
reload. But, what if I want to validate a form, and force a user to
re-enter something I find invalid, but only do it the first 1 or 2
times. Then, I will let them out, so as not to lock them into a field.
Must I use standard global variables for this, or does JavaScript have
a static variable that doesn't involve object-oriented framework?
Thanks,
jab3
Perl)? How can I keep a variable in a JavaScript function that doesn't
change from call to call? It may not make sense in JavaScript; I'm not
sure when the variables are re-set, but I assume it's at each page full
reload. But, what if I want to validate a form, and force a user to
re-enter something I find invalid, but only do it the first 1 or 2
times. Then, I will let them out, so as not to lock them into a field.
Must I use standard global variables for this, or does JavaScript have
a static variable that doesn't involve object-oriented framework?
Thanks,
jab3