Remove the form action and method, to use a simple button (type='button' instead of 'submit'). There is no need to submit the form with Ajax. Attach an event to call the function SendPm with an onclick on this button.
For Ajax call, see (for example) w3schools.com jQuery Ajax introduction
and jQuery Ajax get() and post() Methods