Last active
December 30, 2015 02:59
-
-
Save jameshibbard/7766292 to your computer and use it in GitHub Desktop.
Get employee data via AJAX (1)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>AJAX filter demo</title> | |
</head> | |
<body> | |
<h1>Temporary Worker Database</h1> | |
<div id="workers"></div> | |
<script src="http://code.jquery.com/jquery-latest.js"></script> | |
<script> | |
function updateEmployees(){ | |
$.ajax({ | |
type: "POST", | |
url: "submit.php", | |
dataType : 'json', | |
cache: false, | |
success: function(records){ | |
$('#workers').text(JSON.stringify(records, null, 4)); | |
} | |
}); | |
} | |
updateEmployees(); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment