[Pdx-pm] Perl CGI apps and javascript

Andrew Clapp andrew.clapp at gmail.com
Fri Mar 2 14:35:03 PST 2007

Allow me to clairify, I'm using CGI::Application.  It has you return your
output at the end of each "function" and it prints it for you.
I guess I'm wondering if I should be using the header_add function to apply
the new javascript before CGI::Application prints.


On 3/2/07, Michael G Schwern <schwern at pobox.com> wrote:
> Andrew Clapp wrote:
> > I hope there is a good way to do this.
> >
> > I have a very nice function in my CGI app that makes a nicely formatted
> > table out of a few arguments, the title, an sql query, etc.
> > If I want to make it sortable using dojo's javascript library, this
> > requires me to place some javascript (that specifically references the
> > table) in the header of the html, but typically, I've already printed
> > the header by the time I want to generate the table.
> >
> > How is this done correctly?
> Instead of printing HTML fragments immediately, use a template and pass it
> in all the information it needs to render the page.

"Yes, could I please have half an order of magnitude and a side of PI?"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/pdx-pm-list/attachments/20070302/0eed70bf/attachment.html 

More information about the Pdx-pm-list mailing list