# How do I call a function from head/body custom code on dashboard, to an onClick event? 

**URL:** <https://forum.wixstudio.com/t/how-do-i-call-a-function-from-head-body-custom-code-on-dashboard-to-an-onclick-event/2535>\
**Category:** Ask the community\
**Tags:** code, question\
**Created:** [March 31, 2023, 7:47am UTC](https://forum.wixstudio.com/t/how-do-i-call-a-function-from-head-body-custom-code-on-dashboard-to-an-onclick-event/2535 "2023-03-31T07:47:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gemmacallaway1994](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/gemmacallaway1994/32/25594_2.png) [@gemmacallaway1994](https://forum.wixstudio.com/u/gemmacallaway1994)\
**Post date:** [March 31, 2023, 7:47am UTC](https://forum.wixstudio.com/t/how-do-i-call-a-function-from-head-body-custom-code-on-dashboard-to-an-onclick-event/2535/1 "2023-03-31T07:47:58Z")

</div>

I have installed a js HTML code in advanced settings \> custom code. There is a head and body section. The onClick attribute of ‘GetConveyancingQuote’ is not calling the function though.

Where am I going wrong?

 ![](https://us1.discourse-cdn.com/wix/original/3X/e/7/e70ec2e1393e16a71382a6e65448a092d9c5ad70.png)
