I have a form with after closing form tag an a link. I want to get the form input and have send them to my e-mail when clicking the link. When clicked the user should stay on the same page but hiding the form. This is my (simplified) markup:
<script type="text/javascript">
function doSomething() {
$.get("sendform.php");
return false;
}
</script>
<form id="myForm">
First name:<br>
<input type="text" name"first name"><br>
Last name:<br>
<input type="text" name="lastname">
</form>
<a href="#" onClick="doSomething();">Send</a>
Can I use the $.post() method? And if I can, how would I do this?