Welcome Guest Search | Active Topics | Sign In | Register

EditableLabel - client handler - pass parameters Options
quirtep
Posted: Saturday, September 10, 2011 8:27:57 AM
Rank: Advanced Member
Groups: Member

Joined: 9/6/2007
Posts: 133
I am using an EditableLabel inside of a repeater. I want the client event to be able to know which row triggered the javascript function. ClientSideOnChange does not allow any parameters to be passed. How can the javascript function know which instance of EditableLabel invoked it?
eo_support
Posted: Saturday, September 10, 2011 11:28:01 AM
Rank: Administration
Groups: Administration

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

The first argument to your ClientSideOnChange handler is the client side EditableLabel control. For example, if your handler is like this:

Code: JavaScript
function clientside_on_change_handler(sender, s)
{
    //sender is the EditableLabel object that triggers the event
    //s is the new text

    //return the new text from your handler or return false
    //to cancel change
}


Thanks!
quirtep
Posted: Saturday, September 10, 2011 12:44:35 PM
Rank: Advanced Member
Groups: Member

Joined: 9/6/2007
Posts: 133
This does not help, unless I am missing something. There is no ID property for the EditableLabel control, and so I still don't see how this helps me identify which instance invoked the javascript function since the EditableLabel control is within a repeater.
quirtep
Posted: Sunday, September 11, 2011 10:20:06 AM
Rank: Advanced Member
Groups: Member

Joined: 9/6/2007
Posts: 133
Now I am having the same issue with a DatePicker. Again, it's within a repeater, and I want to be able to identify which row invokes the javascript function, but there is no way to pass a parameter such as would be possible with, for example, onblur for a textbox. Is there a workaround? Thank you.
quirtep
Posted: Sunday, September 11, 2011 10:21:16 AM
Rank: Advanced Member
Groups: Member

Joined: 9/6/2007
Posts: 133
Now I am having the same issue with a DatePicker. Again, it's within a repeater, and I want to be able to identify which row invokes the javascript function, but there is no way to pass a parameter such as would be possible with, for example, onblur for a textbox. Is there a workaround? Thank you.
eo_support
Posted: Sunday, September 11, 2011 7:40:21 PM
Rank: Administration
Groups: Administration

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

Once you have the client side EditableLabel object, you can call this method to get the control's ClientID:

http://doc.essentialobjects.com/library/1/jsdoc.public.control.getid.aspx

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.