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

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?