Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Error: missing name after . operator
- From: elmuchacho at gmail.com (Laurent Muchacho)
- Subject: [Javascript] Error: missing name after . operator
- Date: Fri Oct 28 13:07:13 2005
Hi yes you right sorry if my email might have sounded a bit direct, english is neither my mother tongue. Now to get back to the initial question. Did a bit of research and the error appear in firefox for me too and return the same error Mainly doing "document.forms[0].Interface.value" is not best practice but it should work then I remember the reserved javascript word et voila interface is a reserved keyword found below a url who list them http://javascript.about.com/library/blreserved.htm But at my big surprised document is not a reserved word, Oh and using "top" for a function name, will cause you some problem on Mac safari (it took me a while to work that one out believe me you will remember interface from now on :-) Then I try this just changed the word interface to Interface <form> <input type="hidden" name="Interface"> </form> <script type="text/javascript"> alert(document.forms[0].Interface.value) </script> and it work fine Regards Laurent ----- Original Message ----- From: "diego nunes" <dnunes@xxxxxxxxx> To: "[JavaScript List]" <javascript@xxxxxxxxxx> Sent: Friday, October 28, 2005 5:31 PM Subject: Re: [Javascript] Error: missing name after . operator On 28/10/05, Laurent Muchacho <elmuchacho@xxxxxxxxx> wrote: > I disagree with your statement, The form collection object was here since > the begining and all browser support it. I'm complaining about the use of neither "form" nor "elements" collection. I'm just stating the using "document.NAME_OF_FORM.NAME_OF_ELEMENT" is totally wrong, since the "document" object shouldn't have a property named as the form -- nor the form should have properties named as the elements. Sorry if I wasn't clear -- my English is not that good. -- diego nunes _______________________________________________ Javascript mailing list Javascript@xxxxxxxxxx https://lists.LaTech.edu/mailman/listinfo/javascript
- References:
- [Javascript] Error: missing name after . operator
- From: shashidhar.vutukuru@xxxxxxxxx
- [Javascript] Error: missing name after . operator
- From: diego nunes
- [Javascript] Error: missing name after . operator
- From: Laurent Muchacho
- [Javascript] Error: missing name after . operator
- From: diego nunes
- [Javascript] Error: missing name after . operator
- Prev by Date: [Javascript] Error: missing name after . operator
- Previous by thread: [Javascript] Error: missing name after . operator
- Index(es):