Javascript not loaded in loading ctools modal I have a some modal forms, the link of those embedded in views result,
link are somethings linke share/nojs/2 , I register a menu in callback of the links, 
It work correctly  for root user, but I test it with 2 authenticated user, It work correctly for one of them and in another when I click link instead open modal form redirect me to /share/nojos/2 and tell me Javascript required,according to my codes,It means the javascript not load,
I really confused what happening and what can be reason of this ?

my codes :

$items['share/%ctools_js/%'] = array(
    // 'page callback' =&gt; 'ym_alter_sharing_content',
    'page callback' =&gt; 'ym_alter_sharing_callback',
    'page arguments' =&gt; array(1),
    'access callback' =&gt; 'user_is_logged_in',
    'type' =&gt; MENU_CALLBACK,
);



function ym_alter_sharing_callback($js = FALSE) {
    global $user;
// If people aren't using javascript, then I just boot em. sorry. its 2011.
    if (!$js)
        return "Javascript required";
// Include your ctools crap here
    ctools_include('node.pages', 'node', '');
    ctools_include('modal');
    ctools_include('ajax');

// Create a blank node object here. You can also set values for your custom fields here as well.
    $node = (object) array(
                'uid' =&gt; $user-&gt;uid,
                'name' =&gt; (isset($user-&gt;name) ? $user-&gt;name : ''),
                'type' =&gt; 'share',
                'language' =&gt; LANGUAGE_NONE,
    );

    $form_state = array(
        'title' =&gt; t('sharing'),
        'ajax' =&gt; TRUE,
    );

    $form_state['build_info']['args'] = array($node);
// change this to your type node form
    $output = ctools_modal_form_wrapper('share_node_form', $form_state);

// This means the form has been exectued
    if (!empty($form_state['executed'])) {
        $output = array();
// Close the modal
        $output[] = ctools_modal_command_dismiss();
// I use this method a lot on pages that have views, so what I do is get the latest view content
// with the latest node and replace the current view. magic!
        /*
          $html = views_embed_view('my_view', 'my_display';
          $output[] = ajax_command_html('.view-display-id-my_display', $html);
         */
    }
    print ajax_render($output);
    exit;
}
this looks like a hook_menu() implementation:

$items['share/%ctools_js/%'] = array(
// 'page callback' =&gt; 'ym_alter_sharing_content',
'page callback' =&gt; 'ym_alter_sharing_callback',
'page arguments' =&gt; array(1),
'access callback' =&gt; 'user_is_logged_in',
'type' =&gt; MENU_CALLBACK,


);

you should wrap it in a corresponding function and return menu items:

function your_module_name_menu() {
  $items['share/%ctools_js/%'] = array(
    // 'page callback' =&gt; 'ym_alter_sharing_content',
    'page callback' =&gt; 'ym_alter_sharing_callback',
    'page arguments' =&gt; array(1),
    'access callback' =&gt; 'user_is_logged_in',
    'type' =&gt; MENU_CALLBACK,
  );
  return $items;
}


other code seems to be ok.
Hope this helps someone.