Hehehe...
Thanks.
1:
look at the beginning of count()...
I picked the form via the getelementById.
No need to dig into the document to find it again...
2:
It don't need. Or to be more exact, it would not have needed it 3 years ago.
This script
IS VERY OLD AND OUTDATED. 5 years means "elderly" in programming. It relies on the browser translating document.form_name.form_element notation to reaches them.
As I said to you in my first post, I've noticed some times ago that this method seems to be flawed in recent browser.
Maybe it's the fact that the browser being in a strict mode refuse to access the elements that way, or something else, but it don't work 100% of time on every browsers.
So, I simply defined the element to be reached via a DOM function, which is THE way to go in javascript today.
You should never have to do test and different logic between different browser, and DOM function are much more normalized that native browser functions.
Adding an ID to the form is simply the quickest and simplest way to go.
I could have given you a function that would have fetched every forms in your pages, and analyzed them to apply this validation, but it would have been a bit too much, I think.
As the function name says, getelementById() parse the document, and get a "link", or "reference" to the element having that precise id. Nothing more.
But remember that every id must be unique into the page, or else, only the last element rendered by the browser with that id will be taken in account.
If you are curious about DOM and javascript, take a look there:
http://developer.mozilla.org/en/docs...lement#Methods
But if you don't are used to programming, it will mostly looks gibberishes to you
