# Adding events to Perspective Symbols

**URL:** <https://forum.inductiveautomation.com/t/adding-events-to-perspective-symbols/99332>\
**Category:** Ignition\
**Tags:** perspective, ignition81\
**Created:** [December 2, 2024, 8:43pm UTC](https://forum.inductiveautomation.com/t/adding-events-to-perspective-symbols/99332 "2024-12-02T20:43:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Benjamin\_Furlani](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/benjamin_furlani/32/66084_2.png) [@Benjamin\_Furlani](https://forum.inductiveautomation.com/u/Benjamin_Furlani)\
**Post date:** [December 2, 2024, 8:43pm UTC](https://forum.inductiveautomation.com/t/adding-events-to-perspective-symbols/99332/1 "2024-12-02T20:43:03Z")

</div>

I know 8.3 will have some drawing tools that may or may not fix this for me, but I need to add an onClick to some elements in a symbol. As an example, I have a valve symbol with some of the paths that I want to be clickable and fire an event.

Will I have to just make them individual symbols an add on clicks to them that way or is there another way? I attempted to add onClick as an attribute, but it throws the minified react error for onClick not being a function.

---

<div class="post-metadata">

**Author:** ![David\_Stone](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/david_stone/32/79749_2.png) [@David\_Stone](https://forum.inductiveautomation.com/u/David_Stone)\
**Post date:** [December 2, 2024, 8:48pm UTC](https://forum.inductiveautomation.com/t/adding-events-to-perspective-symbols/99332/2 "2024-12-02T20:48:40Z")

</div>

Somewhere there was a javascript injection hack you could do that ran a javascript script to listen for onclick on the svg `id`  
I can't find it right now, but its in the forum somwehere.

---

<div class="post-metadata">

**Author:** ![Benjamin\_Furlani](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/benjamin_furlani/32/66084_2.png) [@Benjamin\_Furlani](https://forum.inductiveautomation.com/u/Benjamin_Furlani)\
**Post date:** [December 2, 2024, 8:58pm UTC](https://forum.inductiveautomation.com/t/adding-events-to-perspective-symbols/99332/3 "2024-12-02T20:58:20Z")

</div>

> [@New Feature: Perspective Piping](https://forum.inductiveautomation.com/t/new-feature-perspective-piping/49919/138):
>
> welp... i just had to try it out didnt it crazy_face Required version 8.1.22 Behold! JS INJECTED SVG CLICKER [jsInjectedSvgClicker.zip](https://forum.inductiveautomation.com/uploads/short-url/yDwMpbCRuyjgMnIYAO9s4YWkTIz.zip) (3.6 KB) edit: I made the value of the binding become the name it writes to in the view.custom props Be sure to set the custom prop back to null after handling your event so you can trigger the onchange events on the prop wink It should only detect things inside this view. Haven't fully tested it though.

I guess I was just bad at searching my first go around 😆

Thanks for pointing me in the right direction.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [December 3, 2024, 7:47am UTC](https://forum.inductiveautomation.com/t/adding-events-to-perspective-symbols/99332/4 "2024-12-03T07:47:05Z")

</div>

Note that when drawing tools are added, this script might break ^^  
ping me if it happends
