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

RadWindows Open Problem

1 Answer 80 Views
Window
This is a migrated thread and some comments may be shown as answers.
Ayberk
Top achievements
Rank 1
Ayberk asked on 15 Jul 2011, 03:49 PM
I try new feature ContentTemplate of RadWindow. But i get an error on javascripts. 
This error : 
Uncaught exception: TypeError: Cannot convert '$find('ctl00_MainContent_RadWindow_ContentTemplate')' to object
  
Error thrown at line 3, column 12 in openWinContentTemplate() in http://localhost:44012/Proje/DetailProject.aspx?OZ=kCpkEBX9+M1Y7eX6gwenmA==:
    $find('ctl00_MainContent_RadWindow_ContentTemplate').show();
called from line 1, column 0 in <anonymous function>(event):
    openWinContentTemplate();

Javacript Code:
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
    <script type="text/javascript">
        function openWinContentTemplate() {
            $find('<%= RadWindow_ContentTemplate.ClientID %>').show();
        }
          
    </script>
</asp:Content>

RadWindow Code:
<telerik:RadWindow runat="server" ID="RadWindow_ContentTemplate" Modal="true">
    <ContentTemplate>
             Test!
    </ContentTemplate>
</telerik:RadWindow>


Thanks

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 19 Jul 2011, 01:30 PM
Hello Ayberk,

  This approach works fine on my end and this is the first time such an error is reported. Please make sure you do not have a typing mistake in your code somewhere. I attached my test page that I based on your code and here is a video from my experiment: http://screencast.com/t/bXKJAEPBSJT. Please compare yours with it and try to locate any differences. If you are still experiencing difficulties please isolate your case in a simple project and send it back to us so we can examine the actual problematic code.

On a side note - the div that acts as a container for the controls inside renders with a similar ID to the one you have given to the RadWindow, so you may conside changing it to avoid confusion.


All the best,
Marin
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
Window
Asked by
Ayberk
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or