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

Javascript error on RadAjaxManager.GetCurrent(Page).ResponseScripts.Add("radalert('your text')")

1 Answer 263 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Ed Staffin
Top achievements
Rank 1
Ed Staffin asked on 01 Dec 2008, 10:29 PM
Hi,
It was suggested to be by Vlad that I should be able to throw an alert from the server side with the following code:
    RadAjaxManager.GetCurrent(Page).ResponseScripts.Add("radalert('your text')")

When I tried it, I got this error message.
      Microsoft JScript runtime error: 'undefined' is null or not an object

It was in the telerik.web.ui javascript on line 11869, basically, GetRadWindowManager returned 'undefined'

window.radalert=

function(_1,_2,_3,_4){

 

var

_5=GetRadWindowManager();

 

var

_6=_5._getStandardPopup("alert",_1);

Any help would be great.
BTW, I have both a window manager and a ajaxmanager on the page.
Thanks ... Ed

 




1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 02 Dec 2008, 03:26 PM
Hello Ed Staffin,

The correct syntax should be:

Telerik.Web.UI.RadAjaxManager.GetCurrent(Page).ResponseScripts.Add("Sys.Application.add_load(function(){radalert('Welcome to RadWindow <b>Prometheus</b>!', 330, 210);})"

Please check the following KB article for additional information (note that you are using the ASP.NET AJAX version of the controls)
http://www.telerik.com/support/kb/aspnet-ajax/window/calling-radalert-from-codebehind-all-versions-of-radwindow.aspx



Best wishes,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
Ed Staffin
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or