This is a migrated thread and some comments may be shown as answers.

Communication between parent page and NavigateUrl's page

1 Answer 72 Views
Window
This is a migrated thread and some comments may be shown as answers.
Julien
Top achievements
Rank 1
Julien asked on 26 Apr 2012, 04:52 PM
Hi,

Since i don't really know what is possible, i'll explain my goal :
I have a page which contains a radwindow, and this radwindow contains a form with informations to fill.
In that form i have a hidden field which is empty if no inputs has changed, and filled if any of the inputs has changed.
I'd like that on the close button's click of the radwindow, a test is performed against the hidden field to see if i have to display a javascript confirm like "changes have been made, are you sure you want to close?".

So, how can i proceed to reach the value of the hidden field in the navigate url's page, so i can display the confirm or not?

Or maybe if you have a different solution, i'd like to read it

Thanks and sorry for my english (am i understandable enough?)

1 Answer, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 27 Apr 2012, 04:57 PM
Hello Julien,

The OnClientBeforeClose event is handled in the main page, so this is where the confirmation logic must reside. In order to check the hidden filed you need to access the RadWindow's iframe first and call a function that will return the value of the hidden field. The approach for calling such a function is explained in this help article: http://www.telerik.com/help/aspnet-ajax/window-programming-calling-functions.html.


Greetings,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Window
Asked by
Julien
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or