Accessing the form with the syntax
myForm["myelement"]
has the same result as myForm.myelement, except that it also allows javascript illegal identifiers or grammars constructs that would cause unexpected results (in your case: trying to access an undefined element as an array instead of getting an element by name which is using a PHP-expectable array notation)