Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

HTML::Template and frames

by awkmonk (Monk)
on Apr 08, 2003 at 09:51 UTC ( #248869=perlquestion: print w/ replies, xml ) Need Help??
awkmonk has asked for the wisdom of the Perl Monks concerning the following question:

Fellow monks,

This is more of a 'how do the rest of you do it?' type of question.

My current CGI script has a fair amount of hard coded HTML, which I wish to separate out and use HTML::Template.

I have multiple processes running, updating 'status' files. I control the starting/stopping of these via a CGI web page. I have to display the current status of these processes (up to 200) refreshing about every 10 seconds.

The problem is that I'm also using frames. Will I need to set up several templates for the frames and their respective contents, or is there a better way to present the dynamic content (LAYER's perhaps? or HTML::Application?).

perldoc Template didn't give much of a clue, and I couldn't find much in Super Search or on Google (apart from references to JavaScript and DHTML).

Thanks for putting up with me.


'I think the problem lies in the fact that your data doesn't fit my program'.

Comment on HTML::Template and frames
Re: HTML::Template and frames
by benn (Priest) on Apr 08, 2003 at 13:04 UTC
    You'll often need multiple templates anyway, irrespective of whether you use frames or not - its generally a lot cleaner to have a bunch of small templates that you put together (header, footer etc) than use a big HTML::Template with lots of 'if's etc. - nicer on your HTML people too :)

    Generally in this situation, where there are multiple frames updating at different times, I prefer to use a single script/Template combination for each frame - main.cgi, menu.cgi, info-frame.cgi etc.
    One thing you might consider is <iframe>, which is pretty well supported now and can clean up your layout considerably - much nicer than using DHTML (which should never be implemented using *shudder* 'LAYER' btw - but that's a whole other can-o-worms...).

    Cheers,
    Ben

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://248869]
Approved by Thelonius
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2014-10-26 00:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (149 votes), past polls