[htmltmpl] Trailing 1

2007-04-16 Thread Barry Michels
This probably has a very simple solution. I am returning $template-output from a sub and then printing the results. Every time, there's a trailing '1' at the end of the data. How do I eliminate it? index.tmpl: html head titleHello/title /head body Hello World! /body

Re: [htmltmpl] Trailing 1

2007-04-16 Thread Barry Michels
You're right, that's not the exact code. I'm using CGI:Ajax in addition to HTML::Template. At first, I was using strictly CGI:Ajax and doing a $template-output; directly at the end of each sub. But, I wanted to be able to work with users that don't have JavaScript enabled or portable

Re: [htmltmpl] Trailing 1

2007-04-16 Thread Sam Tregar
On Mon, 16 Apr 2007, Barry Michels wrote: my $pjx = new CGI::Ajax('change_page' = \change_page); I'm guess that CGI::Ajax is expecting you to return the HTML, not print it. So try changing this: print Show_Content($pg) if(defined $pg); To: return Show_Content($pg)

Re: [htmltmpl] Trailing 1

2007-04-16 Thread Karen
On 4/16/07, Barry Michels [EMAIL PROTECTED] wrote: print $pjx-build_html($cgi,\Show_HTML); This is going to print the result of the build_html... a nice successful 1, it appears. You might want to test the result, but you probably don't want to print anything on success. sub change_page {