# Framework::refresh\_opener, is it possible to refresh the parent pop up window instead of the main app window?

**URL:** <https://help.egroupware.org/t/framework-refresh-opener-is-it-possible-to-refresh-the-parent-pop-up-window-instead-of-the-main-app-window/74248>\
**Category:** Developers\
**Created:** [January 26, 2020, 5:12pm UTC](https://help.egroupware.org/t/framework-refresh-opener-is-it-possible-to-refresh-the-parent-pop-up-window-instead-of-the-main-app-window/74248 "2020-01-26T17:12:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexS](https://help.egroupware.org/letter_avatar_proxy/v4/letter/a/2acd7d/32.png) [@AlexS](https://help.egroupware.org/u/AlexS)\
**Post date:** [January 26, 2020, 5:12pm UTC](https://help.egroupware.org/t/framework-refresh-opener-is-it-possible-to-refresh-the-parent-pop-up-window-instead-of-the-main-app-window/74248/1 "2020-01-26T17:12:53Z")

</div>

Dear Developers,  
I am developing an accounting application in EGroupware. For this I have a Nextmatch index

 ![image](https://help.egroupware.org/uploads/default/original/2X/2/2a8c9b0fe4c2aa94a4b7a802b9978aedda44ff93.png)

and from there I open an edit Pop up (booking edit) which it self directly (not via iframe) includes a Nextmatch widget with the booking lines:

 ![image](https://help.egroupware.org/uploads/default/original/2X/7/73e30bf145f1ba0ac83adeb54c024c7ea007770e.png)

From this nextmatch you can open each line of the booking via a new edit (booking line edit):

 ![image](https://help.egroupware.org/uploads/default/original/2X/b/b28e04737b1cb2e6e9a1a7b022f67db0efce58e2.png)  
On the save button of this booking-line edit form I have the following:

> if ($save\_result === 0) {  
> //Close window  
> //$msg, $app, $id=null, $type=null, $targetapp=null, $replace=null, $with=null, $msg\_type=null  
> Framework::refresh\_opener($msg, $this-\>app, $content[$this-\>name\_id], ‘update’, null, null, null, $msg\_type);  
> Framework::window\_close();  
> }

On save the window closes as expected, but the

> refresh\_opener

refreshes the main application window and not the booking edit Pop up window as I would like it to.

I there an EGroupware way to refresh the edit Pop up window instead?

Thank you for your support!

BR Alex

---

<div class="post-metadata">

**Author:** ![RalfBecker](https://help.egroupware.org/user_avatar/help.egroupware.org/ralfbecker/32/1307_2.png) [@RalfBecker](https://help.egroupware.org/u/RalfBecker)\
**Post date:** [January 29, 2020, 12:44pm UTC](https://help.egroupware.org/t/framework-refresh-opener-is-it-possible-to-refresh-the-parent-pop-up-window-instead-of-the-main-app-window/74248/2 "2020-01-29T12:44:50Z")

</div>

Framework::refresh\_opener always refreshes the main window because the refresh is carried out by the framework object:

> <https://github.com/EGroupware/egroupware/blob/master/api/js/jsapi/egw.js#L183>

[https://github.com/EGroupware/egroupware/blob/master/api/js/jsapi/egw\_message.js#L351](https://github.com/EGroupware/egroupware/blob/master/api/js/jsapi/egw_message.js#L351)

Only way to avoid that would be implementing an observer in your app.js:  
[https://github.com/EGroupware/egroupware/blob/master/api/js/jsapi/egw\_message.js#L337](https://github.com/EGroupware/egroupware/blob/master/api/js/jsapi/egw_message.js#L337)

If your observer returns true, the the frameworks refresh method is not called. Obviously your observer should carry out the wanted refresh, as it is not happening otherwise.

> Be aware that observer methods get called for refresh requests of other apps too!

Ralf

---

<div class="post-metadata">

**Author:** ![AlexS](https://help.egroupware.org/letter_avatar_proxy/v4/letter/a/2acd7d/32.png) [@AlexS](https://help.egroupware.org/u/AlexS)\
**Post date:** [January 29, 2020, 3:00pm UTC](https://help.egroupware.org/t/framework-refresh-opener-is-it-possible-to-refresh-the-parent-pop-up-window-instead-of-the-main-app-window/74248/3 "2020-01-29T15:00:05Z")

</div>

Hello Ralf,  
thanks a lot for your reply, I will check it out.  
BR Alex
