asked
2009-03-02 06:23:57 +0800
evpole 481 ● 2 as we know it's easy to get textbox's value in CSA:
<textbox id="textbox" action="onblur:alert(#{textbox}.value);"/>
but in combobox :
<combobox id="c" action="onblur:alert(#{c}.value);"><comboitem label="aaaaaaaaaaaa"/><comboitem label="bbbbbbbbbb"/></combobox>
this doen't work.
i've see the codesource on Client:
<span id="z_9j_93" class="z-combobox" z.zcls="z-combobox" z.type="zul.cb.Cmbox" z.combo="true"><input id="z_9j_93!real" class="z-combobox-inp" autocomplete="off" type="text"/><span id="z_9j_93!btn" class="z-combobox-btn"><img class="z-combobox-img" onmousedown="return false;" src="/DsApp/zkau/web/img/spacer.gif"/></span><div id="z_9j_93!pp" class="z-combobox-pp" style="display:none" tabindex="-1">
<table id="z_9j_93!cave" cellpadding="0" cellspacing="0">
<tr id="z_9j_a3" z.type="Cmit" class="z-combo-item " z.zcls="z-combo-item">
<td class="z-combo-item-img"></td><td class="z-combo-item-text">aaaaaaaaaaaa</td>
</tr>
<tr id="z_9j_b3" z.type="Cmit" class="z-combo-item " z.zcls="z-combo-item">
<td class="z-combo-item-img"></td><td class="z-combo-item-text">bbbbbbbbbb</td>
</tr>
</table>
it seems that #{c} returns a span (id="z_9j_93" ) instead of text-input box(id="z_9j_93!real" ).
so How to get the value for combobox in CSA ?