ページが読み込まれたときにajaxを使用して情報を読み込もうとしていますが、情報が表示されていません。誰かが私が間違っていることを見つけることができますか?
$(document).ready(function (){
$.ajax({
url: 'ajax_load.php',
type: "post",
data: "artist=<?php echo $artist; ?>",
dataType: 'html',
beforeSend: function() {
$('#current_page').append("loading..");
},
success: finished(html),
});
});
function finished(result) {
$('#current_page').append(result);
};
ajax_load.phpに含まれるもの:
<?php
if(isset($_POST['artist'])) {
$artist = $_POST['artist'];
echo $artist;
}
echo "test";
?>
ページのhtml部分は問題ありません