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

In reply to Re: Help on Creating HTML tree from hash by George_Sherston
in thread Help on Creating HTML tree from hash by Hero Zzyzzx

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.