Showing posts with label onchange. Show all posts
Showing posts with label onchange. Show all posts

12/21/2010

Fire onchange event on IE





Typical way to make 'enter' key working on certain field is


<rich:hotKey
key="return"
handler="#{rich:element('clearance_agent_id')}.onchange()"
selector="#land_lto_id" />


However, this doesn't work on IE.

To make it work you can add a trick.


<rich:hotKey
key="return"
handler="#{rich:element('clearance_agent_id')}.focus();#{rich:element('clearance_agent_id')}.onchange()"
selector="#land_lto_id" />