I was wondering if anyone could help with what is probably a simple thing, but my brain is fried at this point. I'm not sure if it's an html or js issue.
I have a screen (one form) that displays a text field and a 'search' button, among other things. When I click the 'search' button all works great. When I enter a value in the text field and hit enter with focus still in the input field I was expecting the 'search' button action to be executed -- it is not. But if I click on the screen anywhere after the search button and hit enter, it submits as though search was clicked.
The following is a partial snippet of my html. I am using
struts, hence the html:text tag.
Thanks in advance,
Annmarie
...
<html:form method="post" action="/allCompaniesListDispatchAction.do">
<table border="0" cellpadding="3" cellspacing="0" class="filter>
<tr>
<td width="126" class="filterLabel">Jump To Company</td>
<td width="50" class="filterValue">
<html:text property="jumpToCompanyIdInput" value="" size="10" maxlength="10" styleClass="filterValue" on k eypress="capitalize;" />
</td>
<td width="73" class="filterLabel>
<input type="image" name="" id="search" src="search_green.gif"
on click="setValues('search', jumpToCompanyIdInput.value);"
width="73" height="22">
</td>
<td><img src="spacer.gif" width="10" height="1"></td>
</tr> </table> ....
</html:form>