I'm receiving the variable to JavaScript, but not getting it back in PHP, and I think Its not being coded correctly in the JavaScript:
function glitch_player_display(mix_name) {
alert(mix_name);
throb.start();
jQuery.ajax({
type: 'POST',
url: ajaxglitch_playerajax.ajaxurl,
data: {
action: 'ajaxglitch_player_ajaxhandler',
mix_name: mix_name
},
success: function(data, textStatus, XMLHttpRequest) {
throb.stop();
var showglitchplayer = '#showglitchplayer';
jQuery(showglitchplayer).html('');
jQuery(showglitchplayer).append(data);
},
error: function(MLHttpRequest, textStatus, errorThrown) {
alert(errorThrown);
}
});
}
This is the PHP:
add_action( 'wp_ajax_nopriv_ajaxglitch_player_ajaxhandler', 'ajaxglitch_player_ajaxhandler' );
add_action( 'wp_ajax_ajaxglitch_player_ajaxhandler', 'ajaxglitch_player_ajaxhandler' );
function ajaxglitch_player_ajaxhandler($arguments){
var_dump($arguments);
}
returns empty.
Thanks and have a great one.
url: ajaxglitch_playerajax.ajaxurltourl: ajaxglitch_playerajax; I'm getting the request, but there seems to be another problem...