Page 1 of 1
Refresh parent page when child-page is closed?
Posted: 2014-07-29 12:35
by udayvatturi
Is there a way that i can refresh the page automatically when the child Model Dialog is closes?
I tried the following ways .
1. I couldn't find unique ID for modal dialog , so i am unable to add on hide listener.
2. Few magics hooks code even they are not working.
any suggestions are welcome .
Thanks
Uday
Re: Refresh parent page when child-page is closed?
Posted: 2014-08-26 09:20
by csr21
Hi Uday,
Please share your problem is solved.
If not yet, please elaborate it a little bit. I mean which appgini files you are talking about.
I have already done this.
I just want to be sure that ur reqment is same as I understood.
Re: Refresh parent page when child-page is closed?
Posted: 2014-08-26 14:26
by udayvatturi
Hi,
My issue is resolved, Thanks
Re: Refresh parent page when child-page is closed?
Posted: 2014-08-27 09:47
by csr21
Uday,
can you share the solution for this problem..
Re: Refresh parent page when child-page is closed?
Posted: 2015-01-24 05:23
by Stevo2112
udayvatturi wrote:Hi,
My issue is resolved, Thanks
I would also like to see the solution to this problem, Thanks in Advance.
Re: Refresh parent page when child-page is closed?
Posted: 2020-08-09 13:32
by a.gneady
For anyway looking for a way to add an event listener on closing a modal window:
Code: Select all
$j('.modal').on('hidden.bs.modal', function(){
alert('modal closed!');
})
You should place the above code somewhere that would be executed after the modal is opened. For more on modal events:
https://getbootstrap.com/docs/3.4/javas ... als-events
Re: Refresh parent page when child-page is closed?
Posted: 2020-11-02 14:10
by zibrahim
Hi Ahmed,
I am sorry but I tried to look for the solution for this issue but I could not find it because of the lack of my knowledge.
I sincerely hope that you can help me and others who need some help with this issue.
Perhaps others who have solved this puzzle can also contribute.
Thanking you in advance. Stay safe and healthy.
Re: Refresh parent page when child-page is closed?
Posted: 2020-11-02 14:49
by pbottcher
Try
Code: Select all
$j(function () {
$j('.modal').on('hidden.bs.modal', function(){
location.reload();
})
})
Re: Refresh parent page when child-page is closed?
Posted: 2020-11-03 00:38
by zibrahim
Hi Pascal,
Thank you for your attention and suggestion.
I tried putting the code in PARENT-TABLE-dv.js but no success.
Then I put the same code in CHILD-TABLE-dv.js as well but with no success.
Am I missing something ? Thanks again.
Re: Refresh parent page when child-page is closed?
Posted: 2020-11-03 11:54
by pbottcher
Hi,
as a quick solution you can try
Code: Select all
$j(function () {
$j(document).on('hidden.bs.modal', function(){
location.reload();
})
})
if you want to have it clean you should catch the event and check which modal was closed to differentiate which action shall be taken.
Re: Refresh parent page when child-page is closed?
Posted: 2020-11-06 10:27
by zibrahim
Hello Pascal,
Thanks for the code. It works but I need to click "resend" (reload) in Firefox for reconfirmation while the confirmation window did not appear in Chrome.
Having said that, I found a strange "good" result just by having a dummy "Calculated Field" in the child table which will automatically refresh the parent table value (which also a calculated field derived from the sum of some value in the child table) without applying any additional code, after I close the child modal window. Strange but it works for me.
But again, thank you for the code as I can use it somewhere else that may need it.