Server operation on enter key
I have a search form with several fields for filter and a command button for SEARCH which executes the search against the entries in the filter fields. The tendency with the users is to enter some and press ENTER which causes an error when the search executes ("The given key was not present in the dictionary").
What I would like to do is capture the ENTER key press and then have just execute as if the search command button was pressed. A client side script on field entry can capture the key press but how do I then call the server operation for the other button?
Thanks!
Comments
-
If you are already catching the Enter key, then you can over ride its event and programmatically click the command button from the DOM.
Assuming you have a command button named "Command1"...
$get("Command1").click();
0 -
jm_aussie wrote:
I have a search form with several fields for filter and a command button for SEARCH which executes the search against the entries in the filter fields. The tendency with the users is to enter some and press ENTER which causes an error when the search executes ("The given key was not present in the dictionary").
What I would like to do is capture the ENTER key press and then have just execute as if the search command button was pressed. A client side script on field entry can capture the key press but how do I then call the server operation for the other button?
Thanks!
I'll not go into the trapping of the Enter key (as that is not Metastorm functionality), but to press a button using supported functionality use the client script call:
buttonClick("");
0 -
Hello
We also use buttonClick. It's strange, that Metastorm Employee recommend JavaScript code which is not based on official supported API.
Regards
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 152 General Questions
- 148 Thrust Services
- 57 Developer Hackathon
- 37 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 32 eDOCS
- 190 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 10 XM Fax
- Follow Categories