Hello,
I found a tutorial script that fits my need but it doesn't seem to work. I'm trying to setup a email form that executes without refreshing the whole page but the script doesnt work.
I have a little bit of a javascript weakness and i was wondering if someone can figure this out for me.. greatly appreciated.

thanks

HTML Code:
<!doctype html>
<html>
	<head>
		<title>Submit form without refreshing the page</title>
		<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" </script>
		<script>
			$(function() 
			{	$("#send").click(function() 
				{	$.ajax(
					{	type: "post",
						url: "send.php", 
						data: $("#myform").serialize(),
						success: function(response) 
						{	if(response == "done")
							{	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alert("Form submitted successfully!");	}
							else
							{	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alert("Form submission failed!");	}
						},
						error:function(response){	alert(response);	}
					});
				});
			}); 
		</script> 
	</head>
	<body>
		<form id="myform">
			Name: <br /><input type="text" name="name" id="name" /><br /> 
			Email: <br /><input type="text" name="email" id="email" /> <br />
			Message: <br /><textarea name="msg" id="msg"></textarea> <br />
			<input type="button" id="send" value="Submit" /> 
		</form>
	</body>
</html>

PHP Code:
<?php
$name 
$_POST['name'];
$email $_POST['email'];
$msg $_POST['msg'];

if(!empty(
$name) && !empty($msg))
{    &
nbsp; &nbsp//Do your MySQL or whatever you wanna do with received data
    
&nbsp;&nbsp;&nbsp//Do not forget to echo "done" when action was completed successfully.
    
&nbsp;&nbsp
    echo 
"done"
}
else
{    &
nbsp;&nbsp;&nbsp
    echo 
"fail"
}
?>