# Listener code on a button vs component

**URL:** <https://forum.kirupa.com/t/listener-code-on-a-button-vs-component/169595>\
**Category:** flash\
**Created:** [November 17, 2005, 3:38pm UTC](https://forum.kirupa.com/t/listener-code-on-a-button-vs-component/169595 "2005-11-17T15:38:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SunDog](https://avatars.discourse-cdn.com/v4/letter/s/d2c977/32.png) [@SunDog](https://forum.kirupa.com/u/SunDog)\
**Post date:** [November 17, 2005, 3:38pm UTC](https://forum.kirupa.com/t/listener-code-on-a-button-vs-component/169595/1 "2005-11-17T15:38:24Z")

</div>

Would anyone know why this code won’t work on a graphic button but it does work on a component button?

submit\_bt.addEventListener(“click”, sendInfo);

Thanks
