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

[Solved] How to access the Ajax Panel in a popUp Window

1 Answer 159 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Utku Ozan
Top achievements
Rank 1
Utku Ozan asked on 25 Jun 2009, 12:01 PM
I have a base page (Default.aspx) and two pop-up windows (PopUp1.aspx and PopUp2.aspx). When I click a button in Default.aspx I bring the PopUp1.aspx as a modal window. For some purpose I need to open another PopUp window (PopUp2.aspx) from the PopUp1.aspx as the second pop-up window.

And when I close each of these windows I need to perform some server side actions.So I have OnClientClose event in my Window manager. All required JavaScript codes are called from a file named Default.js and every aspx file has a referance to it.

To visualize the example please refer to the shape below:
http://www.freeimagehosting.net/uploads/c8747568ca.jpg

Everything runs OK until I close the second poup and try to call raise a request to the ajax panel in the first popup. I mean
ajaxManager = $find('ajaxPanelMain'); 
ajaxManager.ajaxRequest('UpdateMain'); 
code works fine but
ajaxManager = $find('ajaxPanelPopUp1'); 
ajaxManager.ajaxRequest('UpdatePopUp'); 

crashes because it can not find the Ajax Panel "ajaxPanelPopUp1" which is in the PopUp1.aspx. IT seems that this code can only see the Ajax Panel at the main page "Default.aspx". How can I call the Ajax Panel in the first pop-up window PopUp1.aspx?

Regards & Thanks in advance.





1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 30 Jun 2009, 10:36 AM
Hi Utku Ozan,

If you need to call client-side methods inside RadWindow's content page, you need to first reference the content frame and the window inside, using RadWindow's client-side API. Please refer to the following article:

Calling Functions in Windows

Alternatively, you can provide your custom arguments to the RadWindow's content page using Query strings and execute your logic directly on the server side. Please find the implementations details here:

Using the URL Query String to Provide arguments to RadWindow

All the best,
Veli
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Ajax
Asked by
Utku Ozan
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or