"Thomas 'PointedEars' Lahn" <Po*********@web.de> wrote in message
news:br************@ID-107532.news.uni-berlin.de...
<snip>
This is true *if*, and only if, by accessing a property of
the global object a *global* *variable* is meant
Exactly how many times do I have to write "global variable"
in this thread before it is clear that I mean global variable?
You can repeat it a hundred times if you like, it does not make
my argument invalid :) I referred to the example Lee used and
have merely added the point as a note to Grant's solution.
Lee's example was posted in response to a message that read:-
<quote cite="http://groups.google.com/groups?selm=
brqhlr%2480%241%40hercules.btinternet.com">
Lee,
I stand corrected.
Tom,
To be FAQ compliant I think I should have suggested:
document.getElementById("SM_MARK_10"+dateNumber).v alue=newValue;
instead of eval() for document elements.
I'm not sure there's a more respectable alternative for variables
(example 1 - the subject of your question).
Maybe Lee can assist here.
^^^^^^^^^^^^^^^^^^^^^^^^^
</quote>
-and the referenced "example 1" reads:-
<quote cite="http://groups.google.com/groups?selm=
brq9ji%24jbu%241%40titan.btinternet.com">
<html
<script>
dateNumber = "01";
eval("SM_MARK_10"+dateNumber+"='XX'");
alert(SM_MARK_1001); // Displays XX
</script>
</html>
</quote>
- clearly the creation of a global variable, as is evident from the
assignment of a string value to the variable with the constructed name.
So from Lee's response on the subject under discussion is the creation
of global variables and any limitations in browser support for accessing
DOM elements as named properties of the global object using similar
syntax is not relevant.
and _not_ a reference to a named DOM object.
<snip>
And how often do I need to explain that the DOM element
question has been resolved and is no longer relevant?
So you declare it resolved and thus it is resolved? Funny.
It wasn't me who decided it was resolved it was Chris.
Richard.