Take the 2-minute tour ×  So i'm using this configuration for an
AJAX call in the administrative area (like this):  add_action(
'admin_head', 'ajaxPerNgg' );  function ajaxPerNgg(){ ?> <script
type="text/javascript" > jQuery(document).ready(function() {
jQuery("#errore a#attivo").click(             var data = {
action: 'my_action'             jQuery.post(ajaxurl, data,
function(response) {                 if(response == "attivato")
jQuery("#errore
a#inattivo").attr("id","completato").html("Attivato");
jQuery("#errore a#inattivo").attr("id","attivo").html("Attivalo
ora"); <?php }  add_action('wp_ajax_my_action',
'my_action_callback');  function my_action_callback() {     echo
'attivato';  It's just a test code, but it always return 0
instead of the string "attivato". It also find the ajax url
correctly, without a 404 error. What is the problem?
share|improve this question Did you ever get this problem
figured out? If so, can you please comment (or ac