As the try-catch was only there to handle the point when the original
loop attempted to access an - elements - member that was not there, with
your new loop it too can go (and avoid the fatal syntax errors that
try-catch always generates on pre-javascript 1.4/ECMAScript(ed 3)
browsers).
I should have made it clear that the code I presented was a replacement,
in full, of the the original.
Onsubmit will provide an opportunity to do what has been asked for:
disable the from elements when the document is submitted. It cannot make
sense to actually do that, as disabled elements are not included in
submissions (they are unsuccessful if disabled).
....I should have also considered what the effect of disabling controls
would have on submission, especially considering I gave someone else a
link to the part of the specification concerning "Successful controls"
earlier in the day.
(I feel like such a fool: I read that section after citing it, too)
But element disabling on submission requests are usually a symptom of
server-side scripts that cannot cope with multiple submissions of the
same form so any client-side "fix" would be solving the wrong problem.
I'm sure that is was to this thread that I would recommend an update to
their server-side software that would limit multiple posts from a user by
tracking what was sent by whom in a certain timescale (or some other
similar method). To whomever it was, the decision was motivated by the
cases where controls would remain disabled if a user returned to the page
using the back button. I still wasn't considering the fact that nothing
would be submitted as it wouldn't meet the criteria for "successful".
(Incidentally, yesterdays F4D oddities; I concluded developer
incompetence. The are trying to concede to our bad formatting argument
by replacing spaces in posts with in the HTML and appear to have
put the code for attempting that in their live environment before
testing it. (burks.))
That still leaves the question: how? Unless there's more to it[1] (I'm not
seeing it if there is), surely they can't mess up what would be a simple
search and replace regular expression? Based on previous performance, I
suppose they can...
Mike
[1] Aside from the obvious exclusion of whitespace in HTML tags and
attribute values.