How do I call a Javascript function post-AJAX form submit?

Here’s my simple problem. I can’t call a javascript function that’s
included in a page after an AJAX post. I think I’ve encountered
something similar in the past, but can’t recall the solution. Here’s
my setup:

I have a form on a webpage that submits via AJAX using JQuery and
JQuery-form. This is what it does:

  1. User clicks checkboxes in the form to select any number of users to
    send message to.
  2. User clicks submit, which triggers an AJAX post
  3. respond_to js opens a hidden div generated from a partial which is
    displayed in a fancybox lightbox
  4. The partial shown in the lightbox contains a text area with a
    character count which will not update when I type in the field!
    • If I just render this partial on the page, the character count
      update works fine. I just can’t get it to work post-AJAX.

I’m happy to post code, but I’m wondering if there’s a general rule
that I’m missing.

Any ideas?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs