Disable refresh on master/detail JavaScript event

I was able to create a custom field of type “label”…Inside the text of “label” I can enter html code and create a canvas element. I also added a button using the button html tag inside this text for the label.

The button calls a function to clear the canvas
…It works, however when fired, the entire page refreshes…

Any idea how to disable this?