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

Radalert popup issue

4 Answers 257 Views
Window
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 1
Joe asked on 21 Dec 2009, 04:37 AM

Just having an issue using the radalert popup functionality...

I'm using the approach from one of the help items like this:

Label1.Text = "<script language='javascript'> window.onload = function(){radalert('<b>Please enter quantity!</b>','', 150, 100);}</script>";

Having RadWindowManager control on the page so that should not be a problem.

However, it gives out an error on this line:
return d.radalert(e,c,a,b);
Microsoft JScript runtime error: 'undefined' is null or not an object

And then:
Microsoft JScript runtime error: Object doesn't support this property or method

Which doesn't seem to make sense, I thought that that was the parameters it was expecting!

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 21 Dec 2009, 06:12 AM
Hello Joe,

Checkout the following KB Article which shows how to show RadAlert from code using RegisterStartupScript() server method of the ScriptManager.
Calling radalert from codebehind (all versions of RadWindow)

Hope this will help,
Shinu.
0
Joe
Top achievements
Rank 1
answered on 21 Dec 2009, 06:44 AM
Shinu, thanks a lot!!
0
Georgi Tunev
Telerik team
answered on 21 Dec 2009, 09:44 AM
Hi Joe,

This is happening because in ASP.NET AJAX, all AJAX controls (including ours) are created on the page after window.onload() (when the script is called). Basically what is happening is that when you try to access the RadWindowManager, it is still not fully rendered on the page, which leads to this error.

More information on the subject is available in the KB that Shinu posted and in this blog post:
http://blogs.telerik.com/supportdept/posts/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.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Joe
Top achievements
Rank 1
answered on 22 Dec 2009, 04:38 AM
Thanks Georgi!
Tags
Window
Asked by
Joe
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Joe
Top achievements
Rank 1
Georgi Tunev
Telerik team
Share this question
or