[Javascript] Error: missing name after . operator

Laurent Muchacho elmuchacho at gmail.com
Fri Oct 28 11:01:05 CDT 2005


Hi diego,

I disagree with your statement, The form collection object was here since 
the begining and all browser support it.
This also apply to document.images, document.links etc.. view here a full 
list of the document Object 
http://www.devguru.com/technologies/javascript/10629.asp
But since a few year a wider support to the DOM have been made available 
through the various browser and many people use document.getElementById
In some case the use of the DOM will not fit you requirement and 
document.forms collection will be what you need to use
We should not restrict our knowledge or our recommendation based on 
preferences in the way we code.

Regards

Laurent


----- Original Message ----- 
From: "diego nunes" <dnunes at gmail.com>
To: "[JavaScript List]" <javascript at latech.edu>
Sent: Friday, October 28, 2005 4:37 PM
Subject: Re: [Javascript] Error: missing name after . operator


On 28/10/05, shashidhar.vutukuru at wipro.com
<shashidhar.vutukuru at wipro.com> wrote:
> When I try and get its  value using
>      document.forms[0].interface.value;

    And, additionally, it's always good to emphasize the fact that
"document.forms[0].interface" IS NOT correct. It's not just another
way of getting the element; it's the way Microfost do. "interface" is
not a property of the object Form. IE always put the elements as
properties of its parents, but it's not the standard.
    You should use either "document.getElementByID" or "elements"
array (child of "form" object) to achieve what you want.

  Amplexos.

--
diego nunes
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript 




More information about the Javascript mailing list