Thanks in advance
You need to create a XMLHttpRequest object then open the request using open function like
request.open("GET/POST","servlet url","true or false");
in case of POST insert all parameter in send method
Whenever the onclick event returns false, the button's default action (submitting the form) won't be invoked. Simple as that.