I was searching for a while but I can't seem to find it. I have a pretty big specific table and instead of having the form sent back to me I want to use the popups-form-noupdate and execute after the modal dialog has been executed (so I expect some result back to say if it succeed or not).

Can somebody tell me the jquery trigger for this?

This is the code I used now. The popups are working great! I only need a chained jquery action.
...
$operations .= l(t('delete'), 'node/'. $nid .'/files/delete/'. $item['fid'],array( 'attributes' => array('class' => 'popups-form-norefresh')));
...

Comments

nick_vh’s picture

I found it
$item['fid'] is my constant id. I have a class table-row-345 (unique number per row)
So every time the link delete is clicked, it will open a popup with that form/page, it will execute and after the popup is closed it will
ONLY refresh the part that is defined in targetSelectors

I managed to find out after searching and really investigating the examples so thanks for the examples.
Might be a good idea to start a wiki documentation about this wonderful API? can't seem to find alot of info about it.

//a big foreach.. with lot's of different items!
$operations .= l(t('delete '.$item['fid']), 'node/'. $nid .'/files/delete/'. $item['fid'],
array(
'attributes' => array(
'id' => 'reload-target-'.$item['fid'],
),
));

popups_add_popups(array(
'#reload-target-'.$item['fid'] =>array(
'targetSelectors'=>array(
'.table-row-'.$item['fid'],
),
)
));
//end of the big foreach!

robertdouglass’s picture

This is confusing because of the scopes involved.

I'm guessing that it is possible, in popups_add_popups(), to specify the following:
- the element in the main page that updates when a popup is closed
- the return value that the popup generates when it closes (becomes the value for the main page target element?)

I would have also expected the possibility to specify a callback in the main page that gets fired when a popup closes.

How do my expectations map to the practical example given above?