I have the following events that can occur on two different fields but on the subject field, apart from also triggering a change event, I would also like to catch if the user presses the enter key instead of the tab key, i.e.:
$("#P300_FILE_NAME,#P300_SUBJECT").change(function(){
... do some processing ....
});
Now from another thread here in SO, I found the following code snippet from here, i.e.
$("#P300_SUBJECT").enterKey(function () {
that works a treat when the enter key is pressed but I would like to incorporate it as part of the above change event code processing, where it can either check if the user pressed the tab key on the subject field or pressed the enter key instead.
Unsure how I can combine the two events in order to perform the necessary "...do some processing ..." code.
It's almost like I need something like:
$("#P300_FILE_NAME,#P300_SUBJECT").change(function() || $("#P300_SUBJECT").enterKey(function () {