in reply to Re: CGI::Ajax No head/html tags, nowhere to insert. Returning javascript anyway.
in thread CGI::Ajax No head/html tags, nowhere to insert. Returning javascript anyway.
Thanks poj
The Show_HTML sub should return the html, not print itI learned that from you.
The error message goes away, when I use code format shown by you. But, when conditional statement is inserted, in between, it fails. Error says - problem at if condition. When I remove if condition, all goes well.
my $html = $session->header(); $html .= $cgi->start_html(-charset=>'UTF-8',-style => {'src' => 'sty +lesheet/style.css'}); $html .= $cgi->div({-id=>'container'}, $cgi->img({src=>'images/pic.png', height=>'100px', + width=>'150px'}), if ($cgi->p(($session->is_expired) || ($session->i +s_empty)) =1) { $cgi->p("logged") }, $cgi->div(
|
|---|