I don't know why this code is don't work
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr"><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>test</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js">
</script>
<script type="text/javascript">
function post()
{
var data = $('#subdata').serialize();
$.post('pro.php',data,function(output)
{
$('#alert').html(output);
});
}
</script>
</head>
<body>
<form id="subdata" onsubmit="post();">
<div id="alert"></div>
<p><br />
Template Name :
<input type="text" name="tempname" /><br />
<input class="button" value="Reset" type="reset" />
<input type="button" value="Submit" />
</p>
</form>
</body>
And here's the pro.php file
if (isset($_POST['tempname']))
{$data = $_POST['tempname'];
echo $data;
}
It's submit the data "There's no loading" but I don't see any reply from pro.php file I don't know why