posted 17 years ago
Though I partially understood you question, you can use onsubmit event handler of the form tag.
You need to use the "submit" button and you need to write the function to handle the onsubmit event of the form. So in both the cases (click of submit button or enter key) will trapped. On the event handler, if you dont want the form to get submitted, you can return false from the event handler.
Hope this helps.