Creating a Cross-Browser (DOM) Expandable Tree

by Volker Weber

As a user interface designer for Web applications, I find that there is a constant need (read: demand) for certain UI components across the board. The most commonly requested component is an expandable/collapsible tree, often referred to as an explorer tree (referring to its use in Microsoft Windows Explorer).

Previously, it could take a lot of time and effort to create a tree that could work in both Internet Explorer and Netscape Navigator. With recent improvements in Internet Explorer and Netscape, however, it is possible to make an expandable tree without needing any browser detection whatsoever.

This article will focus on building a JavaScript tree. The target browsers for this tree are Internet Explorer 5.0 and Netscape 6.1 (Netscape 6.0 had many bugs that could affect the proper display of the tree). This tree will be built with cross-browser code that works on both IE5 and NS6, so that the code requires no browser detection to work on these two browsers (note that if your users may still be using IE4 or NS4, you will need to do an additional browser detect to see if you can use the code in this article).

Sample

More >

Comments

Recent comments

Ben Uris on Klopapier gibt's :: Nur anderswo at 08:50
Thomas Mendorf on Klopapier gibt's :: Nur anderswo at 22:53
Volker Weber on Software Support for the Microsoft Surface Pro X at 22:00
Mariano Kamp on Logitech Zubehör für das Homeoffice at 21:58
Nina Wittich on Klopapier gibt's :: Nur anderswo at 21:26
Amy Blumenfield on Jitsi Meet Desktop Clients at 19:09
Jochen Schug on Logitech Zubehör für das Homeoffice at 18:43
Hermann Behrens on Klopapier gibt's :: Nur anderswo at 16:01
Friedrich Holstein on Klopapier gibt's :: Nur anderswo at 14:56
Mariano Kamp on Logitech Zubehör für das Homeoffice at 14:33
Jochen Kattoll on Software Support for the Microsoft Surface Pro X at 14:03
Volker Weber on Jitsi Meet Desktop Clients at 13:40
Uwe Papenfuss on Klopapier gibt's :: Nur anderswo at 13:19
Kieren Johnson on Jitsi Meet Desktop Clients at 13:08
Volker Weber on Klopapier gibt's :: Nur anderswo at 12:40
Moritz Petersen on Klopapier gibt's :: Nur anderswo at 12:39
Ingo Seifert on Klopapier gibt's :: Nur anderswo at 12:26
Jens Nullmeyer on Klopapier gibt's :: Nur anderswo at 12:20
Volker Weber on Klopapier gibt's :: Nur anderswo at 12:01
Markus Mews on Klopapier gibt's :: Nur anderswo at 11:58
Henning Heinz on Zoom Alternativen at 11:44
Jens Wagner on Software Support for the Microsoft Surface Pro X at 10:28
Volker Weber on Zoom Alternativen at 10:27
Robert Dahlem on Zoom Alternativen at 09:45
Markus Mews on Software Support for the Microsoft Surface Pro X at 08:44

Ceci n'est pas un blog

I explain difficult concepts in simple ways. For free, and for money. Clue procurement and bullshit detection.

vowe

Contact
Publications
Stuff that works
Amazon Wish List
Frequently Asked Questions

rss feed  twitter  amazon

Local time is 11:08

visitors.gif

Paypal vowe