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:
- User clicks checkboxes in the form to select any number of users to
send message to. - User clicks submit, which triggers an AJAX post
- respond_to js opens a hidden div generated from a partial which is
displayed in a fancybox lightbox - 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.
- If I just render this partial on the page, the character count
I’m happy to post code, but I’m wondering if there’s a general rule
that I’m missing.
Any ideas?