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

window.radopen is not a function error

2 Answers 893 Views
Window
This is a migrated thread and some comments may be shown as answers.
EmpowerIT
Top achievements
Rank 2
EmpowerIT asked on 05 Nov 2007, 05:30 AM
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 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 05 Nov 2007, 08:22 AM

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
0
EmpowerIT
Top achievements
Rank 2
answered on 05 Nov 2007, 09:49 PM
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 =)
Tags
Window
Asked by
EmpowerIT
Top achievements
Rank 2
Answers by
Georgi Tunev
Telerik team
EmpowerIT
Top achievements
Rank 2
Share this question
or