findElement("input").value is not working
Hi Guys,
I've a combo inside a tabGroup inside a form and using :
var MyInput = zen("MyCombo").findElement("input").value;
is not finding the current input, any help pls?
Thanks
Product version: Ensemble 2016.1
Discussion (3)0
Comments
Can you post the code for your form? That would be very helpful.
I'd expect that to work provided the id (not name) of the combobox/dataCombo is 'MyCombo'. e.g., this works fine:
Class DC.Demo.FindElement Extends %ZEN.Component.page
{
XData Contents [ XMLNamespace = "http://www.intersystems.com/zen" ]
{
<page xmlns="http://www.intersystems.com/zen">
<form>
<tabGroup showTabBar="true">
<tab caption="Tab One">
<combobox id="MyCombo" editable="true" />
</tab>
<tab caption="Tab Two">
</tab>
</tabGroup>
</form>
<button onclick="zenPage.alertComboValue()" />
</page>
}
ClientMethod alertComboValue() [ Language = javascript ]
{
alert(zen('MyCombo').findElement('input').value);
}
}Thanks Timothy