I have an HTML text box input.
How can I make a specific JavaScript call when I press the "Enter" button while editing this field? Pressing "Enter" currently reloads the entire page, presumably due to submitting the entire form.
NOTE. This HTML / JS code is simply included as a portlet to the large HTML page for the portal, which has one large main form wrapped around my code. Therefore, I canβt control the form - I canβt change the event or action onSubmit or wrap my field inputin a smaller form - otherwise the solution will be obvious :)
Also preferred is a solution that does not include adding a visible button to the form (I don't mind adding a button c display:hiddenif thatβs what you need, but my attempt to do this did not seem to work).
It should be directly JS - no request / prototype / YUI.
PS is a search field, and the action will be a call to the existing search method on the page in JavaScript, if anyone is interested.
Thanks!