in reply to Help on Creating HTML tree from hash

How have you done it?

Before I found enlightenment in the monastery I wrote this. (The working version is a perl script that takes input so that you can get the page with the branches of the tree you were looking at before already open: I turned it into html because that was the easiest way to make it viewable. It's also designed to send the names of chosen branches to another window, but I've commented those lines out.)

It scores over CGI::Explorer in that it doesn't have to make the round trip to the server to open a branch. But it has a couple of disadvantages: (A) it only works in IE - this could (and will) be solved with more javascript; (B) there isn't a facility to update it dynamically: it's for a fairly static menu tree, and I blush to admit that I have a spreadsheet to turn a list of branch names into the relevant HTML.

So it doesn't do it from a hash. But it could. And this is an additional reason why I post this, because it has been in my mind that this might make a useful CGI module if I could write the perl to generate custom trees on the fly. Would it?

§ George Sherston
  • Comment on Re: Help on Creating HTML tree from hash

Replies are listed 'Best First'.
Re: Re: Help on Creating HTML tree from hash
by Hero Zzyzzx (Curate) on Sep 22, 2001 at 08:22 UTC

    That's pretty cool! It's kind of a big disadvantage to have it only work in IE though. You should look into wddx to provide your javascript data structures for you for this project, should you decide to write something in perl.

    I'm actually looking for a perl-only solution, because it's more important in this case for the menus to work properly, on every browser, than to save on the bandwidth.

    Update: s/perl-only/html-only/

    -Any sufficiently advanced technology is
    indistinguishable from doubletalk.