window.radopen is not a function error

3 posts, 0 answers
  1. EmpowerIT
    EmpowerIT avatar
    117 posts
    Member since:
    Jun 2007

    Posted 04 Nov 2007 Link to this post

    Hi,
    I'm getting this error on a page where im using a radscheduler, radtooltip  and a radwindow.
    Other pages in my project work fine, and the only significant difference is that they dont contain a rad scheduler or radtooltip.

    I'll post some of my code below:

    This is how i've setup the scheduler to open the rad window:
    RadScheduler1.OnClientAppointmentDoubleClick = "AppointmentDblClicked"

    <script> 
        function AppointmentDblClicked(sender,eventArgs) 
        { 
            var myApt = eventArgs.get_Appointment(); 
            window.radopen('EditPage.aspx?uid=' + myApt.ID,'StandardWindow'); 
        } 
         
        </script> 

    This is the window declaration:
    <telerik:RadWindow ID="StandardWindow" runat="server" Modal="true" Behaviors="Move,Close" VisibleStatusbar="false" ReloadOnShow="true" Width="400px" Height="500px"></telerik:RadWindow> 

    I've made sure i've included all the required register tags at thetop of the aspx file.

    When i run this, all i get is a window.radopen is not a function error
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 05 Nov 2007 Link to this post

    Hello link64,

    radopen(), radconfirm(), radprompt() and radalert() functions are only available via RadWindowManager - it must be present on the page. If you want to open a single RadWindow which is declared on the page, you need to reference it first with ASP.NET AJAX's $find() method and then call show().

    e.g.

    var oWnd = $find("RadWindow1");
    var myApt = eventArgs.get_Appointment(); 
    oWnd.setUrl('EditPage.aspx?uid=' + myApt.ID);
    oWnd.show();




    Greetings,

    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. EmpowerIT
    EmpowerIT avatar
    117 posts
    Member since:
    Jun 2007

    Posted 05 Nov 2007 Link to this post

    Ah!
    So it was by sheer dumb luck that it was working on all my other pages ... they were a bit more complicated and needed a few radwindows so i thought i'd be fancy and use the radwindowmanager

    Thanks for the help =)
Back to Top