Combo has such html:
[code]
[/code]
If I used getInput(), it returns me
<input type="text" class="dhxcombo_input" style="width:206px;" autocomplete="off">
How can I get second input
<input type="hidden" value="" name="combo"><input type="hidden" value="false" name="combo_new_value">
using dhtmlxCombo API?
Darya
#2
Hi
What is the reason of getting this input?
Second field has value attribute.
I use Angular to watch for changing of this atribute.
I have these lines in directive:
restrict: 'E',
replace: true,
transclude: true,
scope: false,
template: '<div></div>',
I need watch for ‘value’ changing in 2nd input.
I can’t use attrs.$observe(‘value’…) or scope.$watch(‘value’…) because it is associated with div
template: '<div [b]value[/b]="{{value}}"></div>',
Darya
#4
But there is native event “onSelectionChange” - it fires when the preselected value inside the combo changes
docs.dhtmlx.com/api__dhtmlxcombo … event.html
This function works funnily for me)
Events occurs if I changed text which combo have in yourself options…
I can’t explain it))
dhtmlXCombo.prototype.getInput = function() { // returns input, new in 4.0
return this.base.firstChild;
};
Darya
#7
You can try the next:
var input = myCombo.getInput();
var secondInput = input.nextSibling;