Use HTML::Templates and a CGI script to generate the content of your table
cell.

Your table cell would include merely

<DEFANG TMPL_VAR NAME="NEWS">

and your perl code would be something of hte sort of:

my $news = (sql query code goes here...);

my $template = HTML::Template->new(
  filename => "$Template_Dir/$tmpl_file",
  die_on_bad_params => 0,
);

$template->param(NEWS => $news);

----- Original Message ----- 
From: "Ling F. Zhang" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, June 29, 2003 22 21
Subject: Re: Re: dynamic update part of a table


> > well if you want this to 'auto update' at the
> > browser, you will want to look at how to include
> > and 'expire' in the HTTP header. This will oblige
> > the browser to do a 'refresh'... At which point
> > your cgi will need to know how to create a new
> > page - and if that means that one has to put
> > new stuff in the long cell, so be it.
>
> I think you misunderstood my problem.  Say I have a
> file of nicely formated database.  I want to display
> this file on an HTML table cell.  But I don't want to
> work with the HTML everytime I update this database.
> I want the CONTENT of that cell to be generated from
> the file using perl or whatever.
>
> more detail:
> I have a file of (each line being) quotes.  I want to
> make a quote of the day webpage, which randomly pick a
> quote and display it in a table cell. but I don't want
> to dynamically generate the REST of the page which is
> static.  Is there a way I can put some perl code in an
> HTML tags?
> like:
>
> <td><!--some call to a perl cgi program that will
> generate the content of this cell...--></td>
>
> or any otherway to do what I proposed?
>
> Thank yoU!
>
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
>
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to