Drupal 7 Simple Ajax Module returning 404 I am trying to do a simple Ajax call in drupal 7.
But i get a 404 not found.
I tried with another drupal install and it worked.

Here is the list of the installed modules : 

CKEDITOR,
ctools,
entity,
field_collection,
field_group,
pathauto,
references,
token,
wysiwyg

And here is the code : 

function bookmark_ajax_menu() {

  $items['ajax-bookmark'] = array(
    'page callback' =&gt; 'bookmark_ajax_add_article',
    'access callback' =&gt; 'user_access',
    'type' =&gt; MENU_CALLBACK,

  );

  return $items;
}




/**
 * 
 * AJAX FUNCTION FOR ADD ARTICLE
 */


function bookmark_ajax_add_article(){
   global $user;
           $user_name = $user-&gt;name;

   drupal_json_output($user_name);

}

function bookmark_ajax_init(){
    drupal_add_library('system','drupal.ajax');     
    drupal_add_js(drupal_get_path('module', 'bookmark_ajax') . '/bookmark_ajax.js', array('scope' =&gt; 'footer'));
}


(function ($) {
  Drupal.behaviors.bookmark_ajax = {
    attach:function (context) {

      // If the site name is present set it to the username.
      $('document').ready(function(){
           $('body').load(Drupal.settings.basePath+'ajax-bookmark');
      });

    }
  };
})(jQuery);
The first arg to user_access is mandatory, so you need to provide it in hook_menu via access arguments. The default for access callback is already user_access as it happens, so you can omit that:

$items['ajax-bookmark'] = array(
  'page callback' =&gt; 'bookmark_ajax_add_article',
  'access arguments' =&gt; array('access content'), // Or whatever permission makes sense.
  'type' =&gt; MENU_CALLBACK,
);


After you clear caches the page should be accessible.

Incidentally, you don't need to use jQuery.ready when you're inside a Drupal behavior attach method, as those are only ever invoked on DOM ready anyway.