# How to refresh parent window in backend using postMessage API

**URL:** https://forum.shopware.com/t/how-to-refresh-parent-window-in-backend-using-postmessage-api/62238
**Category:** Plugins
**Created:** [9. Oktober 2019 um 10:34 UTC](https://forum.shopware.com/t/how-to-refresh-parent-window-in-backend-using-postmessage-api/62238 "2019-10-09T10:34:25Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![abinjohnedamana](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/abinjohnedamana/32/17378_2.png) [@abinjohnedamana](https://forum.shopware.com/u/abinjohnedamana)
#### Post date: [9. Oktober 2019 um 10:34 UTC](https://forum.shopware.com/t/how-to-refresh-parent-window-in-backend-using-postmessage-api/62238/1 "2019-10-09T10:34:25Z")

</div>

hi

I am creating a plugin with the backend list, add, edit and delete options. When I click on the edit button new window will open and update the existing data. But after the update I want to close the edit window and reload the listing window. unfortunately I cannot find anything to refresh the parent window. I am using the lightweight backend module with postmessage API.

Can you please help me?

---

<div class="post-metadata">

### Author: ![KMSW5DEV](https://avatars.discourse-cdn.com/v4/letter/k/df788c/32.png) [@KMSW5DEV](https://forum.shopware.com/u/KMSW5DEV)
#### Post date: [28. Mai 2020 um 08:05 UTC](https://forum.shopware.com/t/how-to-refresh-parent-window-in-backend-using-postmessage-api/62238/2 "2020-05-28T08:05:13Z")

</div>

in short, i did this with payments and shipping constellations use at your own risk:

```
	function zw() {
		var zahlartenwechsel = window.open('../account/payment','Zahlartwechsel','width=600, height=400'); 
		var timer = setInterval(function() { 
			if(zahlartenwechsel.closed) {
        			clearInterval(timer);
        			location.reload();
    			}
		}, 500);
	}

{if $sUserLoggedIn}
			 
			Zahlart wechseln
			
{/if}

```

you’re welcome. cheers
