tr:inputBox onkeypressed feature only works once

27 views Asked by At

What I am trying to do is to enter a number into a tr:inputBox that will cause a tr:commandButton to be clicked when I hit "Enter" over the tr:inputBox. It works if I have my developer tools up in IE9 an infinite number of times but if the developer tools is not up, it will only work once. Why is this being non-determinant in this manner?

<tr:panelBox styleClass="roundedPanelPrimary">
                     <trh:rowLayout halign="center">
                        <trh:cellFormat halign="center">                                
                            <tr:inputText styleClass="tabdata" contentStyle="normalContent"
                               id= "acctNumber"
                                label="Account Number"
                                type="enter" 
                                onkeypress=" if (event.keyCode == 13) document.getElementById('Search').click()"    
                                value="#{fraudSearch.fraudCustomerReqtUIModelBean.accountNumber}"

                            >

                           </tr:inputText>

                        </trh:cellFormat>

                        <trh:cellFormat halign="left">
                            <tr:commandButton text="Search" id="Search"
                                action="#{fraudSearch.getIBSNotesData}" styleClass="Button"
                                halign="center"

                                >

                                </tr:commandButton>
                        </trh:cellFormat>                           
                    </trh:rowLayout>                        
                </tr:panelBox>
0

There are 0 answers