Communication between parent page and NavigateUrl's page

2 posts, 1 answers
  1. Julien
    Julien avatar
    11 posts
    Member since:
    Feb 2012

    Posted 26 Apr 2012 Link to this post

    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?)
  2. Answer
    Marin Bratanov
    Admin
    Marin Bratanov avatar
    5709 posts

    Posted 27 Apr 2012 Link to this post

    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.
Back to Top