Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I would like to automatically refresh my datatables when the modalframe is closed. I saw the best way is to use the onbeforeunload module / event but I have no idea ho to find out if a modalframe is closed or the parent window. Is there a simple example somewhere or has anyone some hints or code how to find out if a modalframe is closed?
thx in advance for any help
Comments
Comment #1
dsnopekActually, what you want to do is pass an 'onSubmit' function to Drupal.modalFrame.open() when opening your modal. That function will get called when the frame is closed. For example: