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

set_behaviors Error

1 Answer 73 Views
Window
This is a migrated thread and some comments may be shown as answers.
Jared Tucker
Top achievements
Rank 1
Jared Tucker asked on 01 Jul 2008, 10:35 PM
I have a page loading within a RadWindow. The purpose of this page is to let the user choose a widget. Each widget has it's own page that sets its properties. So my page presents a list of widgets, the  user chooses one and the page will then locate to the widget page. Each widget page has its own size and behaviors, some can resize, some can't, etc. Thus I created a function that sets the current RadWindow's URL, size and behaviors based on the selection. Below is a simplified version of this function within the RadWindow:

function OpenAddDialog() {  
    var radWindow = GetRadWindow();  
    if (radWindow) {  
        radWindow.set_width(800);  
        radWindow.set_height(600);  
        radWindow.set_behaviors( Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move );  
        radWindow.center();                              
        radWindow.setUrl('/someotherurl.aspx');  
    }  

When this function fires, a javascript error occurs:

"Telerik.Web.UI.WindowBehaviors.Close" is null or not an object.

What would cause this?

Thanks in advance.

Regards,
Jared

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 02 Jul 2008, 09:07 AM
Hi Jared,

Your code looks fine and does not raise any errors on my side. Can you please confirm that you are using RadWindow for ASP.NET AJAX?

If you still experience problems, please open a new support ticket and send me a small project that isolates this error - just make sure that the project can be run locally and attach it to the support thread. I will check it right away.


All the best,
Georgi Tunev
the Telerik team

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