[ABE.pm] Report/HTML generation

John Cappiello john-abe at apt202.net
Thu May 11 14:57:52 PDT 2006


Faber J. Fedor wrote:
>A cool feature would be the ability to click on a piece of aggregate
>data in one of the inner tables and have a popup window showing the
>constituent data.  And/or double clicking the aggregate data to open the
>constituent data in another window.   The possibilities are endless.

One way to accomplish this, and in my opinion a nice way to present the 
data, /and/ keep it all in one file, is to use some javascript and some 
hidden html elements.

I'm a little fuzzy on the two layers you have, but it doesn't matter 
really.  Let's assume 1 data set, with 1 aggregated graph, and lots of 
subparts.

Put the top level graph in a div (id='agg1') with an onclick event 
something like "document.getElementById('parts1').style.display='block'"

The default style on parts1 would include {display: none}.

So now, all your images for said page, can be included in your mail. 
The images inside the mail can refer to the attched format, the exact 
syntax escapes me at the moment.  You don't have to worry about dealing 
with popups (something I doubt would be easy to finagle).  And you get 
your sort of minimal view with hidden details.  Something I like.

>So here's how I'm thinking of doing it: Have Perl (Ruby?) gather up all
>the data and write an XHTML file that is entirely self-contained, e.g.
>the file consists of the aggregate data tables, the data for the popup
>tables, the CSS for the layout, etc..

Yep, and I think my above suggestions will help with the details hidden 
aspect.  I would just use TT.

>Good idea?  Bad idea?  Any suggestion(s) to make my programming life easier
>to do this (other than outsourcing the job)?

I was going to recomment Mime::Lite for the email generation, but this 
seems like it might be even nicer, if you use TT, Mime::Lite::TT::HTML.

--
jcap


More information about the ABE-pm mailing list