I want a submit type button to send a POST request.
I am thinking about something like this:
You can:
, instead of that button.submit(..) on it. Eg: form.submit(). Attach this code to the button click event. This will serialise the form parameters and execute a GET or POST request as specified in the form's method attribute.