I'm trying to create a module that loads a form into a popup with popupsapi, everything works flawlessly until I need to do something with the popup when the form gets updated.
Is there a way tu run custom js after the form has been updated?
I'm trying to create a module that loads a form into a popup with popupsapi, everything works flawlessly until I need to do something with the popup when the form gets updated.
Is there a way tu run custom js after the form has been updated?
Comments
Comment #1
peacog commentedHi Diego
Did you find a solution? I also need to call some javascript after my form is rebuilt. I hacked the Drupal.ahah.prototype.success function in ahah_helper.js and added my code at the end, but that's not a real solution. Please let me know if you figured out how to do it.
Thanks
Comment #2
andreiashu commentedHi guys,
It is possible to override things like Drupal.ahah.prototype.success. Just copy -> paste that piece of code into your module's .js file and then you can modify it to suit your own needs.
Comment #3
peacog commentedThanks for explaining that. The override worked.
Comment #4
jerome.megel commentedYes, thanks a lot, it worked for me too