It should not be a problem.
Consider:
<input type="button" name="save" value="Save"
onclick="ajaxFunction();" onSubmit="anotherFunction()"/>
I'm not quite sure if you really need
onSubmit
. The HTTP POST is already done through the form action. Well, sometimes it's really needed for some other processing in Javascript.
[EDIT]
After discussion, I agree with Albin. I was only answering you Question about two functions, ignoring the what you want to do with them. I expressed my concern above.
As to the ultimate solution, I would not use either of two function. I always to both validation and further processing on server side, and Ajax call is redundant here. I you want client-side validation, Ajax call is redundant, so use the skeleton implementation suggested by Albin.
—SA