onchange force page submit
Posted
by cometta
on Stack Overflow
See other posts from Stack Overflow
or by cometta
Published on 2010-04-16T09:59:40Z
Indexed on
2010/04/16
10:03 UTC
Read the original article
Hit count: 340
<form jwcid="@Form" listener="listener:updateStaff">
<select jwcid="staffselect@Select" multiple="ognl:false" validators="validators:required" onchange="this.form.submit()" listener="listener:updateStaff">
<span jwcid="@For" source="ognl:hrStaff" value="ognl:currentHrStaff" index="ognl:currentHrStaffIndex">
<option class="text11" jwcid="@Option" selected="ognl:hrStaffSelection[currentHrStaffIndex]" label="ognl:currentHrStaff"/>
</span>
</select>
</form>
when onchange on selectbox, this form will be submitted and my pageValidate() will be called follow by upadteStaff() listener method. I wonder, when such submission is fired, can onchange='' pass a flag ('selectboxisfired' string) that i able to capture inside pagevalidate() 'selectboxisfired'? this will allow my logic inside pagevalidate to indicate is triggered by selectbox.
© Stack Overflow or respective owner