try ... document.getElementsByName('selectbutton').onclick();"/> ...
On 5/22/07, Benjamin Bratkus <[EMAIL PROTECTED]> wrote:
hi folks, actually i am fighting with my different browsers :P so for firefox 1.xand 2.x my app works fine but the same side within ie6 do not work. means i fill in in a h:inputText a string and press return and i got the next view by using the button under the inpuText ie ignores me :9 so i thought about something like : <div> <label for="username">#{msg['add.byusername']} </label> <h:inputText id="username"value="#{myBean.userName}" onkeypress="if(event.keyCode == 13) document.getElementsByName('selectbutton').doclick();"/> <!-- get the select button and press it ? -> </div> <div class="indent-large"> <ul class="buttons"> <li class="select"> <t:commandButton id="selectbutton" name="selectbutton" action="#{myBean.select}" value="#{msg['action.select.label']}" title="#{msg['action.select.tooltip']}" /> </li> <li class="cancel"> <t:commandButton action="#{myBean.cancel}" immediate="true" value="#{msg['action.cancel.label']}" title="#{msg['action.cancel.tooltip']}" /> </li> </ul> </div> question : how can i press the select button via a js function ? best regards, ben