You can:
<input type="submit" ..>
, 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.