struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Walnes" <...@wirestation.co.uk>
Subject RE: PROPOSAL: Change in Nested and Indexed Property Names Syntax
Date Thu, 21 Sep 2000 09:47:47 GMT
Craig, some observations:

Elements can have any name whatsoever and still be accessed via
ECMA/JavaScript, using a quoted string instead. eg:
document.myform.someelement can also be accessed as
document.forms['myform'].elements['someelement']. Having Java-like names
does not cause a problem for ECMA/JavaScript.

A Java indentifier *can* have a property named 'orders$3_billToAddress_city'
(as $ and _ are legal characters). However, 'order[3].billToAddress.City'
cannot be confused with an identifier.

Client-side scripting languages can change. Suppose (completely
hypothetically) PerlScript wanted to be used on the client-side instead, the
$ character would then pose a problem. Ok, that's kindof irrelevant, but I'm
just illustrating why ECMA/JavaScript naming conventions should not be
posing restrictions.

Mime
View raw message