HOME ➔ SUPPORT ➔ Community ➔ General CourseLab issues ... actions on Enter key pressing
actions on Enter key pressing
  View type:
I want an action to be run (an image must be displayed) when the user presses the Enter key after writing a text in a text field. How can I do that? Unfortunately Courselab doesn't have a "onkeypressed" event.
 
03.01.2013 01:32 davide wrote:
I want an action to be run (an image must be displayed) when the user presses the Enter key after writing a text in a text field. How can I do that? Unfortunately Courselab doesn't have a "onkeypressed" event.

 
03.01.2013 01:32 davide wrote:
I want an action to be run (an image must be displayed) when the user presses the Enter key after writing a text in a text field. How can I do that? Unfortunately Courselab doesn't have a "onkeypressed" event.

 
Jquery or javascript
You might find a snippet like this useful http://www.syntacticsugr.com/23-javascript/sugr_cubes/81-globally-capture-key-press-events
This could be added as an initiating event by using a Javascript object to detect a specific key press.
 
 
05.01.2013 01:32 Nickj_UK wrote:
Jquery or javascriptYou might find a snippet like this useful http://www.syntacticsugr.com/23-javascript/sugr_cubes/81-globally-capture-key-press-eventsThis could be added as an initiating event by using a Javascript object to detect a specific key press.

Subject:
Message options
No additional options