Note that there are some explanatory texts on larger screens.

plurals
  1. POCGI::Ajax can not control returned table css style?
    primarykey
    data
    text
    <p>I have question regarding using CGI::Ajax.</p> <p>my CGI::Ajax registered function will return a table, and I want to control the table's style by using jquery plugin tablesorter</p> <p>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</p> <p>major part of code is as below, these are just part of the code, if there are some punctuation problems, please ignore it</p> <p>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.</p> <p>Could someone help me with this issue?</p> <p>Thank you</p> <pre><code>my $cgi = CGI-&gt;new(); my $pjx = CGI::Ajax-&gt;new('js_fun'=&gt;\&amp;perl_fun); sub per_fun{ ... print $cgi-&gt;start_table({id=&gt;'resulttable'}), ... } sub show_html{ //partial code print $html_fh $cgi-&gt;start_html( -title=&gt;'Selected GEO MetaData', -style=&gt; {-src=&gt;[ "jquery-ui-1.8.20.custom.css", "jq_tablesorter/themes/green/style.css", "jq_ui_redmond/css/selectable.css", ] }, -script=&gt;[ { -type =&gt; "text/javascript", -src =&gt; "$tempdir/jq/js/jquery-1.7.2.min.js" }, { -type =&gt; 'text/javascript', -src =&gt; "$tempdir/jq/jq_tablesorter/jquery.tablesorter.min.js" }, { -type =&gt; 'text/javascript', -src =&gt; "$tempdir/jq/jq_ui_redmond/js/jquery-ui-1.8.20.custom.min.js" }, q&lt; $(document).ready(function(){ $("#metatable").tablesorter(); $("#resulttable").tablesorter(); )} .... $("#done").click(function(){ $("#metatable").slideUp(); js_fun(['val1'],['result1']); //ajax return false; }) ..... print $cgi-&gt;div({id=&gt;'result1'}); ..... } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload