More unobtrusive DHTML
2nd July 2003
I’ve talked about unobtrusive DHTML before, and here’s a superb example of it in practise from Chris Casciano. His zeitgeist is enhanced by some clever javascript which hides and reveals tables of data when certain page elements are clicked. View source, and you’ll see that the document contains only structural HTML, with no embedded javascript at all. The special behaviour is added by an external Javascript file which adds the necessary event handlers when it loads, based on the structure of the existing document. This approach maintains the usability of the information in a non-javascript supporting environment, while seriously enhancing the maintainaility of the page as new structural elements can be added to the HTML which will pick up the special behaviour without any further modification to the javascript needed.
More recent articles
- Qwen2.5-Coder-32B is an LLM that can code well that runs on my Mac - 12th November 2024
- Visualizing local election results with Datasette, Observable and MapLibre GL - 9th November 2024
- Project: VERDAD - tracking misinformation in radio broadcasts using Gemini 1.5 - 7th November 2024