I know that this question was asked before, but i didn't find that helpful for my case. I tried
prevent refresh of page when button inside form clicked
The above solution will prevent the refresh but it will not send the Http request.
i have also tried using javascript and it did not work out either.
document.querySelector('#myButton').addEventListener('click', function(event) {
event.preventDefault();
});
My current code
<form method="post">
<a href="http://192.xxxxx/aaa/cccccc"><button type="button" class="button2" > Click me</button></a>
</form>
Any help is appreciated !!