I'm new for Web sites.I have a text box in my page and what i need is when onBlur that text box, call a php method that include sql query.I found something like on the web, but still does net work it.Am i doing wrong?
<?php
if(isset($_POST['Greet']))
{
echo $_POST['Greet'];
}
?>
<html>
<body>
<script type="text/javascript">
function sayHi()
{
var value = $.ajax({
type: "POST",
url: "page.php",
data: "Greet="+$("#Greeting").val(),
async: false
}).responseText;
}
</script>
<input type="text" name="Greeting" id="Greeting" onblur="sayHi()">
</body>
</html>