I have question regarding using CGI::Ajax.
my CGI::Ajax registered function will return a table, and I want to control the table's style by using jquery plugin tablesorter
the result table is returned, but I just can not control the style of it, i.e, I can not sort the table with using the plugin tablesorter in calling function
major part of code is as below, these are just part of the code, if there are some punctuation problems, please ignore it
as you can see, the main program, "show_html", can sort the table, "metatable"; however, the return table, "resulttable" can not be sorted even if I put id='resulttable' there.
Could someone help me with this issue?
Thank you
my $cgi = CGI->new(); my $pjx = CGI::Ajax->new('js_fun'=>\&perl_fun); sub per_fun{ ... print $cgi->start_table({id=>'resulttable'}), ... } sub show_html{ //partial code print $html_fh $cgi->start_html( -title=>'Selected GEO MetaData', -style=> {-src=>[ "jquery-ui-1.8.20.custom.css", "jq_tablesorter/themes/green/style.css", "jq_ui_redmond/css/selectable.css", ] }, -script=>[ { -type => "text/javascript", -src => "$tempdir/jq/js/jquery-1.7.2.min.js" }, { -type => 'text/javascript', -src => "$tempdir/jq/jq_tablesorter/jquery.tablesort +er.min.js" }, { -type => 'text/javascript', -src => "$tempdir/jq/jq_ui_redmond/js/jquery-ui-1.8. +20.custom.min.js" }, q< $(document).ready(function(){ $("#metatable").tablesorter(); $("#resulttable").tablesorter(); )} .... $("#done").click(function(){ $("#metatable").slideUp(); js_fun(['val1'],['result1']); //ajax return false; }) ..... print $cgi->div({id=>'result1'}); ..... }
In reply to CGI::Ajax can not control returned table css style by lightoverhead
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |