Am I missing something? I get the alert stating that the function has indeed been called but apparently the rest is not successful . . . I don't get an alert with the json data in it.
PHP Code:
function updateCreatureList() {
alert('called');
$.ajax({
type: 'GET',
url: 'scripts/php/process.php?mode=creatureList',
dataType: 'json',
success: function(data){
alert(data);
}
});
}
here is the php in process.php if it matters
PHP Code:
if ($_GET['mode'] == 'creatureList') {
$query = "SELECT * FROM `creatures`";
$result = mysql_query($query, $link) or die(mysql_error());
$row = mysql_fetch_array($result);
echo json_encode($row);
}