I was actually trying to do two things when I only needed to do one.
I didn't need the button.click function at all since by default it submits the form. I just needed to put the button.click function inside form.submit instead.
$("form").submit(function(event){
//perform button function
return false;
});