Issues with form button on web

Hi,

I have a form which is used only on web. I’ve a hotspot button on the form which runs a Formula and update a field on the form. I want to access this (formula updated) field’s value with JS. I also have a html button on the form.

I’ve written JS on click event of the html button as

document.forms[0].myBtn.click()

where myBtn is the hotspot button.

The code works fine, the formula updates the field. But the problem is the page reloads on the browser such that my other JS variables vanishes.

Is there any way to prevent reloading of the page when a hotspot button is clicked on the browser?

Thanks