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

responsescript does not work

2 Answers 52 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 05 Jan 2009, 07:20 PM

Hi.. I have an ajax panel  and a radgrid within it... 
The ItemCommand calls the following.. But nothing is displayed.. what I am I doing wrong.?  thanks again



 

private void  ShowAlert()

 

{

 

string script = "<SCRIPT LANGUAGE='JavaScript'> ";

 

script +=

"alert('HELLO');";

 

 

script +=

"</SCRIPT>";

 

 

this.RadAjaxPanel1.ResponseScripts.Add(script);

 

}

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 06 Jan 2009, 07:46 AM
Hello Jon The Nerd,

You do not need the <script> tag. Here is an example:

RadAjaxPanel1.ResponseScripts.Add("alert('HELLO');");

Kind regards,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Jon
Top achievements
Rank 1
answered on 06 Jan 2009, 02:08 PM
Thanks.. that worked
Tags
Ajax
Asked by
Jon
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Jon
Top achievements
Rank 1
Share this question
or