|
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?
|
|
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!
|
|
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.
|
|
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.
|
|
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.
|
|
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.aspxThanks
|
|