I have a main page opening a radwindow with URL pointing to another domain. Now is there a way to track the rad window closing in the opening domain?
Main Page: https://www.sitename.com/subdomain1/mainpage.aspx
Radwindow URL: https://www.sitename.com/subdomain2/windowpage.aspx
When the Radwindow is closed i am able to trigger an event in "subdomain1/mainpage.aspx". But i would like to trigger an event (server side or client side) in "subdomain2/windowpage.aspx".
5 Answers, 1 is accepted
Hello Niranjan,
You can try the OnClientBeforeClose event and access the child page where you can call some JavaScript function depending on your scenario.
Otherwise, you can use the main page server-side to execute the needed logic as the RadWindow loads the child page in an iframe, which is inaccessible on the server-side.
Regards,
Peter Milchev
Progress Telerik
Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).
Peter,
Thanks for the response. But the OnClientbeforeclose event is firing only in the calling page, in this case https://www.sitename.com/subdomain1/mainpage.aspx. But i want to handle something before the window closes in the Radwindow page (different domain) https://www.sitename.com/subdomain2/windowpage.aspx.
Hello Niranjan,
Yes, the function is called on the main page because that is where the RadWindow resides.
My suggestion was to use this event in the main page, access the child page via JavaScript and execute some predefined function inside the child page.
Regards,
Peter Milchev
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Hello Niranjan,
When the NavigateURL is passed to the RadWindow, it just loads the url in an <iframe> element. That means the same approach would work and the same issues will occur as if you were loading your child page in a simple <iframe>.
Also, you can find the following article helpful to accessing the child page if the loaded page allows it:
Regards,
Peter Milchev
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.