I've used the following example to allow multiple buttons to submit serialized form data but with different options, e.g. Save and Save & Close. Even though I'm using jQuery to post serialized data the whole page reloads because i'm sending the ajax post response data back to "document.body".
<form id="myform">
<button id="button1" type="button" onclick="submitButton(true,false)" name="save" value="save">Save</button>
<button id="button1" type="button" onclick="submitButton(true,true)" name="close" value="close">Save and Close</button>
</form>
function submitButton(save,close) {
$.ajax({url:'page.asp', data:''+$('#myform').serialize()+'&save='+save+'&close='+close+'',
type: 'post',
success: function(data){$(document.body).html(data);}
});
}
You don't need a form element as you can use this with any element that has a unique id.