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

Object expected error with radalert

2 Answers 117 Views
Window
This is a migrated thread and some comments may be shown as answers.
Michael Love
Top achievements
Rank 1
Michael Love asked on 28 Sep 2009, 07:04 PM
Hi there.

I was just trying to add a simple radalert to my aspx page that I call from my code behind upon successful completion of a task.

Here is the code I am executing from inside a button click handler:

 

string scriptstring = "radalert('Task information loaded successfully!', 330, 210);";

 

 

RadScriptManager.RegisterStartupScript(this, this.GetType(), "radalert", scriptstring, true);

When I execute the code, I get the following error:

Error: Object expected

When looking a the page source, the error is occurring on the first open tag here:

<script type="text/javascript">
//<![CDATA[
radalert('Task information loaded successfully!', 330, 210);Sys.Application.initialize();
Sys.Application.add_init(function() {
    $create(Telerik.Web.UI.RadAjaxManager, {"_updatePanels":"","ajaxSettings":[],"clientEvents":{OnRequestStart:"",OnResponseEnd:""},"defaultLoadingPanelID":"","enableAJAX":true,"enableHistory":false,"links":[],"styles":[],"uniqueID":"ctl00$RadAjaxManager1","updatePanelsRenderMode":0}, null, null, $get("ctl00_RadAjaxManager1"));
});
Sys.Application.add_init(function() {
    $create(Telerik.Web.UI.RadTabStrip, {"_selectedIndex":0,"_skin":"Default","clientStateFieldID":"ctl00_RadTabStrip1_ClientState","selectedIndexes":["0"],"tabData":[{},{},{},{},{}]}, null, null, $get("ctl00_RadTabStrip1"));
});
//]]>
</script>
</form>
</body>
</html>

I am probably missing something obvious. Any help provided would be much appreciated.

Mike

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 29 Sep 2009, 06:01 AM
Hello Michael,

Have you added RadWindowManager on page?
Also checkout the following KB article which describes how to call RadAlert from code behind.
Calling radalert from codebehind

-Shinu.
0
Michael Love
Top achievements
Rank 1
answered on 05 Oct 2009, 05:02 PM
Yep, I was missing the window manager. I thought I had one on the page, but it was on the master page.

Thanks, Mike
Tags
Window
Asked by
Michael Love
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Michael Love
Top achievements
Rank 1
Share this question
or