# Including onEvent for written responses

**URL:** <https://forum.code.org/t/including-onevent-for-written-responses/39347>\
**Category:** Uncategorized\
**Created:** [April 23, 2024, 2:53pm UTC](https://forum.code.org/t/including-onevent-for-written-responses/39347 "2024-04-23T14:53:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nathan.hofflander](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/nathan.hofflander/32/8878_2.png) [@nathan.hofflander](https://forum.code.org/u/nathan.hofflander)\
**Post date:** [April 23, 2024, 2:53pm UTC](https://forum.code.org/t/including-onevent-for-written-responses/39347/1 "2024-04-23T14:53:03Z")

</div>

Student wants to use onEvent that calls a function then the click “targetID” as a parameter of the event. Is acceptable to use for written response?

“click” is student developed procedure.

onEvent (“gameScreen”, “click”, function (event) {  
click (event.targetID);  
});
