Welcome Guest Search | Active Topics | Sign In | Register

Regarding ClientSideAfterUpdate Options
Venkat
Posted: Monday, December 17, 2007 2:44:26 PM
Rank: Member
Groups: Member

Joined: 9/28/2007
Posts: 20
Hi,

I want to execute some client side script, as a result of processing on server. If I do not find any data for selected parameters, I have to alert user "No Data Found". I know, I can use "ClientSideAfterUpdate" property for doing this. But I want to know, the return value from server side. Is there any way or any object where in data is returned from server side, which I can catch at client side?
eo_support
Posted: Monday, December 17, 2007 3:25:05 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,083
Hi,

You can handle ClientSideAfterExecute and save the third parameter, which is a value that you can passed to from the server side:

http://www.essentialobjects.com/ViewDoc.aspx?t=JSDoc.Public.Global.callback_after_execute_handler.html

Once you save that value, you can then check it inside your ClientSideAfterUpdate handler.

Thanks
Venkat
Posted: Tuesday, December 18, 2007 10:02:46 AM
Rank: Member
Groups: Member

Joined: 9/28/2007
Posts: 20
Hi,

I am using ClientSideAfterExecute attribute of "CallBackPanel" as client side event handler.

I want to read information returned by a second parameter, because that is where my actual value is getting updated. I have placed an hidden variable in this callbackpanel, and at server side, I am changing the value of this variable. Can you please let me know, how to read this variable value? I am getting a string for secod parameter. I can do a substring, but want to know, if there is any sophisticated way.

I also tried using the third parameter. I created a public property and assigned the value. But the value set at server side is not getting reflected for this property. Can you please also, let me know the correct way of transferring value to client side using "property" approach?
eo_support
Posted: Tuesday, December 18, 2007 1:21:33 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,083
Venkat wrote:
I want to read information returned by a second parameter, because that is where my actual value is getting updated. I have placed an hidden variable in this callbackpanel, and at server side, I am changing the value of this variable. Can you please let me know, how to read this variable value? I am getting a string for secod parameter. I can do a substring, but want to know, if there is any sophisticated way.


No.

Venkat wrote:
I also tried using the third parameter. I created a public property and assigned the value.


Please refer to the document link posted above. It already explained where the value comes from.
Venkat
Posted: Tuesday, December 18, 2007 3:27:16 PM
Rank: Member
Groups: Member

Joined: 9/28/2007
Posts: 20
Hi,
I read the document link which you mentioned. But i am getting an error while using the Data property of CallbackEventArgs. Could you please tell if this is right way of declaring. Please help.
I am getting this err "use of unassigned local variable ab".

EO.Web.CallbackEventArgs ab;
ab.Data = "NO";

Thanks.
eo_support
Posted: Tuesday, December 18, 2007 3:36:52 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,083
Hi,

You are way too much off. An event argument class such as CallbackEventArgs is only supposed to be used inside an event handler. You can only pass data to the client side from the CallbackPanel's Execute event handler, which already defines a CallbackEventArgs argument for you.

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.