Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: CGI::Ajax can not control returned table css style

by Corion (Pope)
on May 12, 2012 at 19:12 UTC ( #970213=note: print w/ replies, xml ) Need Help??


in reply to CGI::Ajax can not control returned table css style

What part of your problem relates to Perl?

Does Perl output the correct HTML? If no, then you will need to show us the HTML you expect, and the HTML you get, and tell us where they differ.

I suspect that your problem only relies on the Javascript side of things. If you replace an item on the Javascript DOM, you need to rebind all the events you want on it.


Comment on Re: CGI::Ajax can not control returned table css style
Re^2: CGI::Ajax can not control returned table css style
by lightoverhead (Monk) on May 12, 2012 at 19:52 UTC

    Thank you Corion.

    The perl script actually output the correct table

    The problem I encountered is that this table can not be sorted by tablesorter plugin evenif I have printed an id='resulttable' for this returned table.

      Maybe you want http://jquerymonks.org? You will need to learn how to re-bind events on to Javascript DOM objects. This has nothing to do with Perl, so please don't ask Javascript (or jQuery) questions here.

        This is actually a question regarding CGI::Ajax, that's why I thought to ask it here.

        I want to recapitulate my points, hopefully, somebody can help

        1.javascript/jquery plugin in the main html building function such as in "show_html" can control the effects of the element (such as a table) in this subroutine which is not inserted by ajax

        2. However, if I use ajax to insert an element(such as a table) into the final html page, then the plugin can not have effect on this inserted table.

        so, my question is how to make ajax inherit control of javascript plugin in the final html on the inserted element?

        Thank you.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://970213]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2014-07-26 14:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (177 votes), past polls