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

Radalert JS error when calling from Grid insert command

1 Answer 54 Views
Window
This is a migrated thread and some comments may be shown as answers.
Web team
Top achievements
Rank 1
Web team asked on 27 Apr 2010, 10:15 AM
I am calling radalert from the server side inside radgrid insertcommand.

Here's my code:
Page.ClientScript.RegisterStartupScript(GetType(), "key""<script type='text/javascript'>javascript:radalert('" + pMessage + "'); </script>"); 


I am having javascript error saying parameter c, d and a are undefined.

function GetRadWindowManager(){return Telerik.Web.UI.WindowManager.Manager; 
}window.radalert=function(e,c,d,a){var b=GetRadWindowManager(); 
return b.radalert(e,c,d,a); 
}; 


1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 27 Apr 2010, 10:53 AM
Hello Arnold,

The reason for the problem can be the RadWindowManager is still not rendered on the page when you call the radalert. The following KB article shows how to call radalert for different scenarios:
Calling radalert from codebehind 

Also checkout the blog post: Executing JavaScript function from server-side code

Regards,
Princy.
Tags
Window
Asked by
Web team
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or