Press 'Enter' In A Field And Trigger An Action(One final post before I head off for ILUG2007 just because I love you guys! :-)
For all of it's usefulness, the signal-to-noise ratio on the forum at Lotus developerWorks (i.e. notes.net) is quite low. When you do find a really useful nugget, though, you want to share it with the world. I found just such a nugget, which is related to my blog topic from the other day.
CLICK HERE TO CHECK IT OUT!
Then come back...I'll wait...
So...in my case, I changed the hotspot link to a button. The button contains the LotusScript that does all the work of finding the document and displaying it to the user. Then I simply placed Peter's code in the places he notes in the posting above, and et voilà! Now the user can click the button or hit enter. A simple and elegant solution to a problem I never had solved before.
One other thing you might consider is to clear out the field when the user executes the search. This will depend on your situation, but in my case, the last thing the LotusScript in the button does is clear the field. That way, if the user returns to the homepage by closing the document window, the field will be ready for them to enter the next number.