AJAX call, hook_menu the requested url does not exist I want to create an AJAX request, so therefore I implement hook_menu and add this code in my .module file:

$items['aug_store_front/get-products/ajax'] = array(
  'title' =&gt; t('Get products from specific product group'),
  'page callback' =&gt; 'aug_store_get_products',
  'access arguments' =&gt; array('access content'),
);


I also add this callback function:

function aug_store_get_products($value) {
  if($_POST['id'] = 6) {
    return drupal_json_output(array('status' =&gt; 'success'));
  }
  return drupal_json_output(array('status' =&gt; 'failure'));
}


And at last, I'we added this code in a JS file:

jQuery(function($) {
  $(".view-aug-store-frontpage li a").click(function(e) {
    e.preventDefault();
    $.post('/aug_store_front/get-products/ajax', {
      id: 6,
    });
  });
});


Now when I click on the list element, the request is made but I get a 404 error.


What have I done wrong?
You've confused access arguments with access callback. It should be:

$items['aug_store_front/get-products/ajax'] = array(
  'title' =&gt; t('Get products from specific product group'),
  'page callback' =&gt; 'aug_store_get_products',
  'access arguments' =&gt; array('access content'),
);