Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

CRAAZYYY Perl Mash Up

by Anonymous Monk
on Aug 05, 2008 at 05:16 UTC ( [id://702217] : perlquestion . print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks,

Here's the deal in short form. I have an XML document that I have parsed nicely using XML::SIMPLE and then I used the parsed information to make a very basic HTML document.YOu click on someone, and it takes you where it is in that document. Simple...beautiful.

Here's what I've been asked to do. I need to make this HTML document interactive. So that when something is clicked on, it only displays certain information in another window. The scripts are not on my machine but a server, while the HTML document is on my computer. The server is very secure, because it's a research server, so I can't do HTML requests, and I think that throws out cgi as well. Anyway that's the short story.

Now, if you're curious I'll provide a tad more info. I am a biochem student doing research in Autism Genomics but I've got perl and programming into the mix. I need it so that when you click on a certain chromosome, only Autism genes from that chromosome (which I have collected earlier and stored in a file) appear in a new window separate from all other chromosome gene info. (As per request of my supervisor). WHY HTML? Because my supervisor wanted a 200 page report which she could print and read through and then was impressed at my mad HTML skills and now wants it fancier but not too fancy. I'd also prefer not to reinvent the wheel and take a totally new angle.

Replies are listed 'Best First'.
Re: CRAAZYYY Perl Mash Up
by Corion (Patriarch) on Aug 05, 2008 at 06:46 UTC

    I haven't fully understood what you need to produce, so here's what I think you want to produce:

    • You need static HTML output because your infrastructure does not allow for CGI
    • You want to produce one "overview" page per client listing (data on) the chromosomes of that client
    • You want to produce one "detail" page per client and per chromosome listing only the autism genes from that client and chromosome

    This sounds to me like a job for a templating system (like Template or HTML::Template) and a database (like DBD::SQLite) to make finding the information more convenient for you.

Re: CRAAZYYY Perl Mash Up
by jbert (Priest) on Aug 05, 2008 at 10:36 UTC
    You could:
    • Split your html doc into two DIVs (with mad CSS skills). These are your "two windows".
    • Add a javascript (JS) trigger, so that when you click, you display the additional info in the new pane (as well as setting the original pane to what you currently display)

    That won't require any CGI, database or anything else. If you already know CSS, JS and DOM then you're probably OK.

      This is how I would do it. In fact, you can just toggle the visibility attribute of the parts you want to show or not show. jquery could be of help here.
Re: CRAAZYYY Perl Mash Up
by Bloodnok (Vicar) on Aug 05, 2008 at 12:08 UTC
    Hi ,

    AFAIK, in this day and age, most browsers support frames, so why not utilise 'em?? Say a frame for the 'index' (maybe representing the overall structure using JavaScript) and a further frame for the display of the (whole of) user selected entry...

    Just a thought ,

    HTH ,

    At last, a user level that overstates my experience :-))
Re: CRAAZYYY Perl Mash Up
by wrinkles (Pilgrim) on Aug 05, 2008 at 06:44 UTC
    I'm still curious. Show us your code.