Active
Project:
Popups API (Ajax Dialogs) [D7]
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 Feb 2009 at 22:39 UTC
Updated:
11 Dec 2010 at 15:40 UTC
would it be possible to add a callback for a popup in hook_popups to execute a certain js function
so it could be possible to add wysiwyg editors, and attach the behaviours to the new fields
Comments
Comment #1
starbow commentedVersion 6.x-1.2 alpha has an after submit callback, but I haven't implemented it in the 6.x-2.x branch yet.
Comment #2
amitkeret commentedJust to clarify:
The request here is not to add the option of custom callback when the popup page is submitted.
It's to add a callback after the popup was created and placed on the page.
I my case, this is because in Drupal's jQuery there's no .live() function. For that reason, you cannot connect .bind() callbacks to any elements added to the page by this modal method.
To bypass this problem, we need the option of adding a JS callback function, that will bind elements in the modal.
Thank you.
Comment #3
drewish commentedDon't we call Drupal.attachBehaviors on the content that comes back in? That should allow you to bind to the new elements.