11 Answers, 1 is accepted
0
Hi Hadar,
To invoke RadAlert or any of the other predefined RadWindows you must first add the RadWindowManager to your page and then you will be able to use them.
More details for predefined dialogs can be found here.
Sincerely yours,
Fiko
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
To invoke RadAlert or any of the other predefined RadWindows you must first add the RadWindowManager to your page and then you will be able to use them.
More details for predefined dialogs can be found here.
Sincerely yours,
Fiko
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

Hk
Top achievements
Rank 2
answered on 25 Dec 2008, 01:11 PM
Hi,
I have already defined a RadWindowManager:
before I made the question, therefore it remains..
I have already defined a RadWindowManager:
<telerik:RadWindowManager id="RadWindowManager1" runat=server skin="Vista" EnableEmbeddedScripts="true"></telerik:RadWindowManager> |
0

GT
Top achievements
Rank 1
answered on 26 Dec 2008, 10:01 AM
Hi Hadar,
How do you call the lala() function? For example yu can try with <button onclick="lala(); return false;">test</button> - that should work.
Cheers,
Hulky
How do you call the lala() function? For example yu can try with <button onclick="lala(); return false;">test</button> - that should work.
Cheers,
Hulky
0
Hi Hadar,
The rovided code seems to be correct when you want to call radalert. I tested it and it is works as expected on my side. I am not sure what is your exact setup and how you call the function "lala()". For your convenience I attached a simple web page with my setup that you can use as start point.
I will describe logic of the project :
Best wishes,
Fiko
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
The rovided code seems to be correct when you want to call radalert. I tested it and it is works as expected on my side. I am not sure what is your exact setup and how you call the function "lala()". For your convenience I attached a simple web page with my setup that you can use as start point.
I will describe logic of the project :
- attach the showRadWindow() to the OnClientClick event in asp:Button declaration e.g. :
<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="showRadAlert(); return false;" /> - insert "return false;" statement after attached showRadWindow() function. This prevents the postback when button is pressed.
- implement the function e.g. :
<script type="text/javascript"> function showRadAlert() { var message = " RadAlert dialog"; radalert(message); } </script>
Best wishes,
Fiko
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

Hk
Top achievements
Rank 2
answered on 28 Dec 2008, 08:30 AM
Hi Fiko,
As I mentioned, i'd like to invoke the method not thorugh a button click - I want the alert to be displayed as the page loads.
For some reason I get this error when I try to run your script (I've opened it as an AJAX 1.0 Enabled solution):
This is what i meant:
<script type="text/javascript">
function showRadAlert()
{
var message = " RadAlert dialog";
radalert(message);
}
showRadAlert();
</script>
As I mentioned, i'd like to invoke the method not thorugh a button click - I want the alert to be displayed as the page loads.
For some reason I get this error when I try to run your script (I've opened it as an AJAX 1.0 Enabled solution):
'~/Telerik.Web.UI.WebResource.axd' is missing in web.config. RadScriptManager requires a HttpHandler registration in web.config. Please, use the control Smart Tag to add the handler automatically, or see the help for more information: Controls > RadScriptManager
This is what i meant:
<script type="text/javascript">
function showRadAlert()
{
var message = " RadAlert dialog";
radalert(message);
}
showRadAlert();
</script>
0

Shinu
Top achievements
Rank 2
answered on 29 Dec 2008, 07:24 AM
Hi Hadar,
RadScriptManager needs an HttpHandler to be declared in the application configuration file to operate properly. This can be done through the SmartTags of the control. Please open the page in Design mode. Click on the smart tag near on your RadScriptManager and choose Register Telerik.Web.UI.WebResource.axd. Check out the folowing link for more details.
RadScriptManager
Thanks,
Shinu.
RadScriptManager needs an HttpHandler to be declared in the application configuration file to operate properly. This can be done through the SmartTags of the control. Please open the page in Design mode. Click on the smart tag near on your RadScriptManager and choose Register Telerik.Web.UI.WebResource.axd. Check out the folowing link for more details.
RadScriptManager
Thanks,
Shinu.
0

Hk
Top achievements
Rank 2
answered on 29 Dec 2008, 07:45 AM
thanks,
yet my original question about invoking the radalert as I shown in my previous post, is not answered... :)
yet my original question about invoking the radalert as I shown in my previous post, is not answered... :)
0

Shinu
Top achievements
Rank 2
answered on 29 Dec 2008, 08:25 AM
Hello Hadar,
I hope you want to display RadAlert when the page loads. You can try the below code snippet to show RadAlert on page load. ie, call the RadAlert from "pageLoad" function.
JavaScript:
Thanks.
Shinu.
I hope you want to display RadAlert when the page loads. You can try the below code snippet to show RadAlert on page load. ie, call the RadAlert from "pageLoad" function.
JavaScript:
<script type="text/javascript"> |
function pageLoad() |
{ |
var message = " RadAlert dialog"; |
radalert(message); |
} |
</script> |
Thanks.
Shinu.
0

Hk
Top achievements
Rank 2
answered on 29 Dec 2008, 08:40 AM
Shinu,
not exactly, on server side I enable / disable the call to the "lala()" function. it means that sometimes
is rendered, according to server side issues, and sometimes it doesn't.
I will "patch" it and render a full pageLoad call, I just wondered why a simple call as aboce won't simply invoke as the page rendered and loaded.
Hadar
not exactly, on server side I enable / disable the call to the "lala()" function. it means that sometimes
<script language="javascript"> |
lala(); |
</script> |
I will "patch" it and render a full pageLoad call, I just wondered why a simple call as aboce won't simply invoke as the page rendered and loaded.
Hadar
0
Hi Hadar,
The error message that you get is pretty self-explanatory. Did you follow the instructions in the error message?
As for showing radalert from the server, I believe that the following KB will be of help:
http://www.telerik.com/support/kb/aspnet-ajax/window/calling-radalert-from-codebehind-all-versions-of-radwindow.aspx
In addition, if you want to keep the client-side logic that you already use, you should call the function in the ASP.NET AJAX's pageLoad() event:
All the best,
Georgi Tunev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
The error message that you get is pretty self-explanatory. Did you follow the instructions in the error message?
As for showing radalert from the server, I believe that the following KB will be of help:
http://www.telerik.com/support/kb/aspnet-ajax/window/calling-radalert-from-codebehind-all-versions-of-radwindow.aspx
In addition, if you want to keep the client-side logic that you already use, you should call the function in the ASP.NET AJAX's pageLoad() event:
function pageLoad() |
{ |
var message = " RadAlert dialog"; |
radalert(message); |
} |
All the best,
Georgi Tunev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

Hk
Top achievements
Rank 2
answered on 06 Jan 2009, 12:15 PM
That won't work for me, because i have to wait untill several controls are loaded and read their text. If i try to do it on the pageload, the controls are still not loaded and they are null.
I just want the radalert simply invoke without any outer function! just as the script renders..
I just want the radalert simply invoke without any outer function! just as the script renders..