Welcome Guest Search | Active Topics | Sign In | Register

Custom alert in CallBackPanel Options
Samuele
Posted: Friday, July 6, 2007 12:23:24 PM
Rank: Advanced Member
Groups: Member

Joined: 5/31/2007
Posts: 58
Hi,

is possible to have an custom javascript alert (es: "Done" or "Error") after update the CallBackPanel?

Thank
Paroca
eo_support
Posted: Friday, July 6, 2007 10:18:19 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
hi, Samuele

Sure it is possible.
What you need to use is this ClientSideAfterUpdate client side event:
http://www.essentialobjects.com/ViewDoc.aspx?t=EO.Web.CallbackPanel.ClientSideAfterUpdate.html
Set it to a javascript function name. In that function, you can do whatever you want.

Thanks.
Samuele
Posted: Saturday, July 7, 2007 1:41:15 AM
Rank: Advanced Member
Groups: Member

Joined: 5/31/2007
Posts: 58
Thanks,

but i needed create all at server side..
I've resolved so:

Code: Visual Basic.NET
Private GlobalMessage As String = Nothing
    Private Sub CBPExecute(ByVal sender As Object, ByVal e As EO.Web.CallbackEventArgs)
        Dim Writer As HtmlTextWriter = e.Writer
        Writer.WriteFullBeginTag("script")
        Writer.Write(GlobalMessage)
        Writer.WriteEndTag("script")
        GlobalMessage = ""
    End Sub

    Public Sub AttanchMessageToCallbackPanel(ByVal CBP As EO.Web.CallbackPanel, ByVal Message As String)
        Message = MyUtility.Generic.FixJavascriptString(Message)
        GlobalMessage = "alert('" & Message & "');"
        AddHandler CBP.Execute, AddressOf CBPExecute
    End Sub
eo_support
Posted: Saturday, July 7, 2007 9:00:40 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Glad you resolved it.
Feel free to let us know if you have more questions.

Thanks.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.