I have a RadWindowManager and a RadGrid inside a RadUpdatePanel and for some reason my RadAlertMessage won't show. It works great when I remove the panel.
Here is my Alert function:
Public Sub ShowRadAlertMessage(ByVal message As String)
Dim radalertscript As String = "<script language='javascript'> Sys.Application.add_load(function(){radalert('" & message & "', 330, 210);})</script>"
Page.ClientScript.RegisterStartupScript(Me.[GetType](), "radalert", radalertscript)
End Sub
All I do is call it and pass it the message that I want displayed. What can I do to get this to work inside the update panel?
Here is my Alert function:
Public Sub ShowRadAlertMessage(ByVal message As String)
Dim radalertscript As String = "<script language='javascript'> Sys.Application.add_load(function(){radalert('" & message & "', 330, 210);})</script>"
Page.ClientScript.RegisterStartupScript(Me.[GetType](), "radalert", radalertscript)
End Sub
All I do is call it and pass it the message that I want displayed. What can I do to get this to work inside the update panel?
7 Answers, 1 is accepted
0
Hello Ronnie,
You do not need Sys.Application.add_load. Here is an example how to achieve your goal:
ScriptManager.RegisterStartupScript(Page, GetType(Page), "radalert", "radalert('Hi!');", True)
All the best,
Vlad
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
You do not need Sys.Application.add_load. Here is an example how to achieve your goal:
ScriptManager.RegisterStartupScript(Page, GetType(Page), "radalert", "radalert('Hi!');", True)
All the best,
Vlad
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Ronnie
Top achievements
Rank 1
answered on 16 Dec 2008, 07:01 PM
Thanks Vlad for the response. I changed my alert function to this and it still isn't working correctly. Am I missing something else?
Public Sub ShowRadAlertMessage(ByVal message As String)
Dim radalertscript As String = "radalert('" & message & "')"
Page.ClientScript.RegisterStartupScript(Page.GetType(), "MyAlert", radalertscript, True)
End Sub
Public Sub ShowRadAlertMessage(ByVal message As String)
Dim radalertscript As String = "radalert('" & message & "')"
Page.ClientScript.RegisterStartupScript(Page.GetType(), "MyAlert", radalertscript, True)
End Sub
0
Hello Ronnie,
Would you please try the approach suggested by Vlad?
Let us know whether this helps.
Best regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Would you please try the approach suggested by Vlad?
Public Sub ShowRadAlertMessage(ByVal message As String) |
Dim radalertscript As String = "radalert('" & message & "')" |
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "MyAlert", radalertscript, True) |
End Sub |
Let us know whether this helps.
Best regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Ronnie
Top achievements
Rank 1
answered on 16 Dec 2008, 08:06 PM
I am getting javascript error when I use that function. It says,
'this._windwos.length' is null or not an object
and
Object doesn't support this property or method.
'this._windwos.length' is null or not an object
and
Object doesn't support this property or method.
0
Hello Ronnie,
Do you have RadWindowManager on this page?
Greetings,
Vlad
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Do you have RadWindowManager on this page?
Greetings,
Vlad
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Accepted
Hello Ronnie,
I have yet another suggestion.
Please take the RadWindowManager out of the RadAjaxPanel control and try again.
Let us know if you need more information.
Best regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
I have yet another suggestion.
Please take the RadWindowManager out of the RadAjaxPanel control and try again.
Let us know if you need more information.
Best regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Ronnie
Top achievements
Rank 1
answered on 17 Dec 2008, 03:12 PM
Thanks Both of you, that was exactly the issue. I had the Rad window inside the update panel along with my grid. I appreciate all the help.