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

Rad Window [ Modal]

7 Answers 131 Views
Window
This is a migrated thread and some comments may be shown as answers.
A.mass
Top achievements
Rank 1
A.mass asked on 20 Apr 2009, 06:15 PM


Hello everyone,

I'm trying to make a sample page to see how RadWindow could be used.

I dragged a RadScriptManager with ID = RadScriptManager1, then added a RadWindowManager to the page.

and wrote the following code to pop-up the window when needed with some Info.

// I tried both ways  
 
RadScriptManager.RegisterStartupScript(this, RadScriptManager1.GetType(), "ALERT", "radalert('Testing RadWin!', 330, 100);", true); 
 
//============================================================== 
 
ScriptManager.RegisterStartupScript(this, RadScriptManager1.GetType(), "ALERT", "radalert('Testing RadWin!', 330, 100);", true); 

but I'm getting the following javascript error.

Microsoft JScript runtime error: 'this._windows.length' is null or not an object
Microsoft JScript runtime error: Object doesn't support this property or method

Any hint would really be appreciated.

Thank you.

7 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 1
answered on 21 Apr 2009, 06:50 AM
Hi Abdulla,

Try the following code snippet and see whether it is working fine.

CS:
 
protected void Button1_Click(object sender, EventArgs e)  
{  
    RadScriptManager.RegisterStartupScript(this, RadScriptManager1.GetType(), "ALERT""<script type='text/javascript'> Sys.Application.add_load(function(){radalert('Testing RadWin!', 330, 100);})</script>"false);  

Thanks,
Princy.
0
Accepted
Georgi Tunev
Telerik team
answered on 22 Apr 2009, 07:13 AM
Hello Abdulla,

This error occurred in previous versions of the control when the RadWindowManager was Ajaxified in some way. Please either upgrade to a recent version of the control (the current one is Q1 2009 SP1) or exclude the RadWindowManager from ajaxification.

If you still experience problems, it will be best to open a support ticket and send us a small sample project so we could examine your exact setup and logic.

Sincerely yours,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jerry
Top achievements
Rank 1
answered on 08 May 2009, 05:14 PM
Hello,

I have exactly the same issue and I am using 2009.1.402 version.  Could you please tell me where I can find SPI?  It is not in my account's download page.

thanks,

Jerry
0
Accepted
Georgi Tunev
Telerik team
answered on 11 May 2009, 10:17 AM
Hi Jerry,

2009.1.402 is Q1 2009 SP1. Please open a support ticket and send us your application or a sample one where this issue could be reproduced. Just make sure that the project can be run locally and attach it to the ticket - we will check it right away.


All the best,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Wveimar
Top achievements
Rank 1
answered on 18 May 2009, 08:08 PM
I'm facing the same problem.  I decide to use Sys.Application.add_load which solves the javascript error pointed in this post.  This solution causes another problem:  every time the user causes a postback on the page, Sys.Application.add_load event stacks the generated messages so the user receives how many messages as how many times he causes postbacks on the page.
0
Georgi Tunev
Telerik team
answered on 19 May 2009, 06:15 AM
Hello Wveimar,

You could use the following approach in your solution:
function f()  
{  
    //code 
    Sys.Application.remove_load(f);  
}  
Sys.Application.add_load(f);  

More information on the subject is also available in the following blog post:
http://blogs.telerik.com/blogs/09-05-05/executing_javascript_function_from_server-side_code.aspx

Regards,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Wveimar
Top achievements
Rank 1
answered on 19 May 2009, 01:48 PM
Thanks Georgi, with your post i solve the problem.  Although there's a workaround solution to the same issue, which consists in add two RadWindowManager, one of them ajaxified (inside a RadAjaxPanel), and the other in the top of the page (outside the RadAjaxPanel).  Obviously, your solution is better.
:)
Tags
Window
Asked by
A.mass
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Georgi Tunev
Telerik team
Jerry
Top achievements
Rank 1
Wveimar
Top achievements
Rank 1
Share this question
or