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

Content

1 Answer 37 Views
Window
This is a migrated thread and some comments may be shown as answers.
Christian
Top achievements
Rank 1
Christian asked on 04 Oct 2010, 09:10 AM
Dear Telerik-Team

I add a RadWindowManager and a RadWIndow to my page. I set via javascript the target for the RadWindow. The RadWIndow open up with the target dir. Everything as aspected! But how can I access controls in the RadWIndow from the page with open up the RadWindow. If I use the the RadWindow with a content template there isn't a probelm but with a navigation url I don't find the way to access something in the RadWIndow.

Thanks for your help.
Christian

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 04 Oct 2010, 10:19 AM
Hi Christian,


By obtaining a reference to a RadWindow component, you can call any function that is defined in that windows content window or can access the control placed in teh content window.

Just use the contentWindow property to reference the Content Window of the RadWindow component:

Here is sample code where the Label is placed inside the content widnow and I'm calling the function from main page.

<script type="text/javascript">
    function changeText() {
        radalert("HAi");
        var oWnd = GetRadWindowManager().getWindowByName("UserListDialog");
        var lbl = oWnd.get_contentFrame().contentWindow.document.getElementById('Label1');
        lbl.innerText = "clear";
    }
</script>


More information will be available in the documentation:
http://www.telerik.com/help/aspnet-ajax/window_programmingcallingfunctions.html


Thanks,
Princy.
Tags
Window
Asked by
Christian
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or