Marcos José Setim wrote:
I would like to know if is better to use document.forms to detect forms
or getElementById.
document.forms.formName or document.forms['formName'] has much better
support in older browsers, compared to
document.getElementById('formId'). On the other hand it depends on what
you want to do with your script, if you want to e.g. cloneNode,
removeChild, appendChild stuff in the form then document.forms might
access the form element object in older browsers while the remaining
functionality is not supported at all so you have no advantage using
document.forms.
--
Martin Honnen
http://JavaScript.FAQTs.com/