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.<br>I guess I'm wondering if I should be using the header_add function to apply the new javascript before CGI::Application prints.
<br><br>-ASC<br><br><div><span class="gmail_quote">On 3/2/07, <b class="gmail_sendername">Michael G Schwern</b> <<a href="mailto:schwern@pobox.com">schwern@pobox.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Andrew Clapp wrote:<br>> I hope there is a good way to do this.<br>><br>> I have a very nice function in my CGI app that makes a nicely formatted<br>> table out of a few arguments, the title, an sql query, etc.
<br>> If I want to make it sortable using dojo's javascript library, this<br>> requires me to place some javascript (that specifically references the<br>> table) in the header of the html, but typically, I've already printed
<br>> the header by the time I want to generate the table.<br>><br>> How is this done correctly?<br><br>Instead of printing HTML fragments immediately, use a template and pass it<br>in all the information it needs to render the page.
<br></blockquote></div><br><br clear="all"><br>-- <br>"Yes, could I please have half an order of magnitude and a side of PI?"<br>