Entry
Why does setting onClick="dothis()"; work but not onclick="dothis();"? Note the capital "C".
Jan 10th, 2002 15:37
Jean-Bernard Valentaten, Russ Locke,
> I was under the impression, that all javascript functions could be
> coded with any variation of
> capitalization "onclick", "ONCLICK", "oNcLiCk", however the prefered
> standard was all lowercase.
> Is this not true?
Hmm, it depends. If you're talking of the js-handler onclick, then not.
The js functions and handlers in any js-scriptblock are casesensitive.
However if you're talking of the handlers that are used in the
html-code, then they are caseinsensitive, e.g.:
<img src="myImg.jpg" onclick="doit();"> is not casesensitive
If the problem persists, please tell us in which browser it happenes and
maybe you could show us some code. Both might help finding the error
(maybe the bug in the browser).
Jean