[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Demexp-dev] Any ideas to manipulate trees on a web page?

From: skaller
Subject: Re: [Demexp-dev] Any ideas to manipulate trees on a web page?
Date: Tue, 10 Jan 2006 08:32:48 +1100

On Mon, 2006-01-09 at 21:31 +0100, David MENTRE wrote:
> Hello,
> I'm trying to find a way to implement in HTML a tree folding/unfolding,
> similar to the GTK widget Tree View[1]... and I haven't many ideas. 

IE can do it using Javascript: the technique is built in 
to interscript, point your browser at

for a complete (and very long) example.

This technique uses the Domain Object Model, and Javascript
to scan all the objects, and assign a MS specific extension
attribute to some objects, namely:

    if( == "none") { = "";
      srcElement.checked = true;
    } else { = "none";
      srcElement.checked = false;

The extension is the display style "none" which renders
an object entirely invisible AND using no space.

The tree rendered is the classical folding tree, with 
a mouse click toggling open/closed state of a branch.

It does NOT work on Firefox as far as I know: the tree
is presented but the branches can't be closed.

It is probably possible to do it by dynamically querying
an internal database and generating the required HTML.
This should be portable .. but it is very clumsy and
slow because the whole page must be re-rendered on every
state change.

The MS technique should have been standardised .. but it wasn't.

With CSS is may be possible to emulate the MS style on
all CSS capable browsers. (but you still have to have Javascript).

John Skaller <skaller at users dot sf dot net>
Felix, successor to C++:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]