I have a custom dialog with a button and an input on it. On the click event of the button I want to trigger the OnChange function of the input. I don't know how to get the sibling UIElement of the current one.
Here is an example of my code:
Thanks in advance for your help
Here is an example of my code:
{ id : 'txtUrl', type : 'text', label : 'My input', onChange : function() { alert('content changed') } } { type : 'button', align : 'center', label : 'My Button', onClick : function() { // execute the input.onChange() ????? } }
Thanks in advance for your help
Re: how can I execute OnChange of a sibling UIElement
otherwise, you would need to get the other UIelement from the dialog and fire a change event on it
Re: how can I execute OnChange of a sibling UIElement
If you know other way to handle that problem, I will appreciate your advice. Thanks
Re: how can I execute OnChange of a sibling UIElement
Re: how can I execute OnChange of a sibling UIElement
I can see my code is not retrieving the UIElement, I think it only retrieves a DOM object; I wonder if there is a way to get the input's UIElement using the id 'txtUrl, or by using the UIElement of the button'.
thanks for your help.
Re: how can I execute OnChange of a sibling UIElement
the proper way (untested) is more along this lines:
Re: how can I execute OnChange of a sibling UIElement
works like a charm!!! thanks a lot