How to reload the contents of a popup (modal)

Asked

Viewed 236 times

0

I have a form that one of the buttons when clicking opens a popup (modal). Inside this popup I have a simple crud to insert, edit and delete people. When I click on one of these options, a new form opens in a new tab. I wanted to know how to do after saving/edit/delete in this tab, I close this tab and update my modal that was open in the previous page. I already got the tab to close, but I can’t update the popup, or then make it reopen.

1 answer

0


You can use window.opener and re-assign Location.href. This will work as a re-load of the page that opened it:

<script>
    window.opener.location.href = window.opener.location.href;
</script>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.