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

[Solved] How to open a new RadWindow and invoke a method

7 Answers 185 Views
Window
This is a migrated thread and some comments may be shown as answers.
Ori Ram
Top achievements
Rank 1
Ori Ram asked on 25 Jun 2008, 11:51 AM
Hi,

I have this code:
<radW:RadWindowManager ID="rwm" runat="server" Skin="Blue" Behavior="Maximize,Close,Move"
    <Windows> 
        <radW:RadWindow Modal="true" Height="500px" Width="550px" VisibleOnPageLoad="false" 
            ID="Test" Title="Test" runat="server" Left="10" Top="10" ShowContentDuringLoad="false" NavigateUrl="Test.aspx" /> 
    </Windows> 
</radW:RadWindowManager> 





And i am opening the window on client side

var oManager = GetRadWindowManager(); 
var oWnd = oManager.GetWindowByName('Test'); 
oWnd.Show(); 

What i would like to do is to call a method on Test.aspx, that will put a value in an input element
How can i do it?


7 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 25 Jun 2008, 01:57 PM
Hi Ori Ram,

You should use "get_contentFrame().contentWindow". More information on the subject is available in the documentation:
http://www.telerik.com/help/aspnet-ajax/window_programmingcallingfunctions.html



Greetings,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Ori Ram
Top achievements
Rank 1
answered on 26 Jun 2008, 05:58 AM

I tried to do it. But when i am first popping my window, it has not been loaded yet. So i can't access my functions.

Is there a way to synchronic load my window, right after it was loaded to invoke a client side function on the opened window?

0
Georgi Tunev
Telerik team
answered on 26 Jun 2008, 07:10 AM
Hi Ori,

Yes, you can hook to the OnClientPageLoad eventhandler and execute the code from the documentation there.



Regards,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Ori Ram
Top achievements
Rank 1
answered on 26 Jun 2008, 12:18 PM
Can u give me an example? Beacuse i've also tried this solution but i am getting a javascript exception. (Because the base hasn't been totaly loaded yet.
0
Georgi Tunev
Telerik team
answered on 26 Jun 2008, 01:48 PM
Hello again Ori,

Please find attached the requested example.


Greetings,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Ori Ram
Top achievements
Rank 1
answered on 29 Jun 2008, 07:56 AM
Ok , I've understand my problem.

The function i'm trying to invoke in the new window uses the document.getElementById function.

What i am trying to do, is to open a new window, and to change an input value in it.

Is it possible?
0
Georgi Tunev
Telerik team
answered on 30 Jun 2008, 03:41 PM
Hello Ori,

Yes, this is possible, however this functionality goes beyond RadWindow's functionality.
Our suggestion is to implement the desired logic not by using RadWindow but a standard browser's popup (window.open()). Once you have it working as expected, the same approach will work with RadWindow as well.





Best wishes,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Window
Asked by
Ori Ram
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Ori Ram
Top achievements
Rank 1
Share this question
or