There has been lots written about separating content from presentation,
and most developers see the benefit of this approach (cleaner, leaner
markup; faster download speeds; easier maintainability, etc). There is
also a fair amount written about separating behaviour from both content
and presentation, but it tends to be practiced less than separation of
content from presentation. HTML (or even XHTML) should be used for content
, CSS for presentation, and ECMAScript for behaviour.
All the time JavaScript was a Netscape proprietary technology, its use
could not be endorsed by the W3C. In the middle of 1998, the European
Computer Manufacturers Association (ECMA) created a public domain
specification based on JavaScript, but using a standardised Document
Object Model. The third edition of the ECMAScript Language Specification
was published in December 1999; Standard ECMA-262.
To illustrate using a completely separate behavioural layer, I'll
demonstrate a collapsible menu system. All of the examples are HTML,
but work equally well as XHTML, even when served with the correct MIME type.
read on at http://juicystudio.com/ecmascriptmenu.asp
--
Neerav Bhatt
http://www.bhatt.id.au
Web Development & IT consultancy
http://www.bhatt.id.au/blog/ - Ramblings Thoughts
http://www.bhatt.id.au/photos/
http://www.bookcrossing.com/mybookshelf/neerav
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************