![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have two onsubmits I'd like to include in my <FORM...> tag and wanted to know before I go through the work of putting in all the code if this is even allowed. And if not then how should I be calling it? FORM action="test.cgi" method="POST" onsubmit="csave()" onSubmit="return checkform()" Thanks, Chris |
#3
| |||
| |||
|
|
I have two onsubmits I'd like to include in my <FORM...> tag and wanted to know before I go through the work of putting in all the code if this is even allowed. And if not then how should I be calling it? FORM action="test.cgi" method="POST" onsubmit="csave()" onSubmit="return checkform()" |
|
Thanks, Chris |
#4
| |||
| |||
|
|
In XHTML, yes; in HTML, the case of element and attribute names does not matter, but using camelCase is not unusual for the event handling attributes, to draw parallels with the usual Javascript coding style. |
#5
| |||
| |||
|
|
David Dorward wrote: Ironically, while camelCase is the usual JS style, in the case of event handlers, the DOM methods are lower case. Indeed. IIRC, *all* DOM properties that have a one-to-one mapping to HTML attributes are lower case. |
#6
| |||
| |||
|
|
Toby A Inkster wrote: David Dorward wrote: Ironically, while camelCase is the usual JS style, in the case of event handlers, the DOM methods are lower case. Indeed. IIRC, *all* DOM properties that have a one-to-one mapping to HTML attributes are lower case. Consistancy would be nice, but sadly ... *.className, meta.httpEquiv, body.bgColor, and so on. |
#7
| |||
| |||
|
|
Toby A Inkster wrote: David Dorward wrote: Ironically, while camelCase is the usual JS style, in the case of event handlers, the DOM methods are lower case. Indeed. IIRC, *all* DOM properties that have a one-to-one mapping to HTML attributes are lower case. Consistancy would be nice, but sadly ... *.className, meta.httpEquiv, body.bgColor, and so on. |
| |
![]() |
| Thread Tools | |
| Display Modes | |
| |