Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

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

Replies are listed 'Best First'.
Re^2: CGI::Ajax can not control returned table css style
by lightoverhead (Pilgrim) 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 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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://970213]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2018-07-23 12:07 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (465 votes). Check out past polls.