Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7681961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:27:40+00:00 2026-05-31T18:27:40+00:00

I am using the jQuery dynatree along with the context menu found here .

  • 0

I am using the jQuery dynatree along with the context menu found here. The issue I’m having is that I can’t get the enable/disable of the context menu or individual items in the menu to work. The plugin says I should be able to do this:

$("#contextMenu").enableContextMenu();

but that doesn’t work for me. Here’s the menu:

 <!-- Definition of context menu -->
 <div id="contextMenu">
     <ul id="myMenu" class="contextMenu">
       <li class="resubmit"><a href="#resubmit">Resend</a></li>
     </ul>
 </div>

The menu shows and works fine if I don’t put any enable/disable, but there are cases where the menu item is not available so I need to be able to control its state. If I put in the enable/disable, the manu doesn’t show at all.

Can anyone share how they got this to work?

UPDATE: I can only get the menu to show if I remove the DIV above. Then it will show, but enable/disable using “myMenu” does nothing…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T18:27:41+00:00Added an answer on May 31, 2026 at 6:27 pm

    I couldn’t disable the menu itself, so I had to handle it after the item is selected:

    switch( action ) 
    {
        case "resubmit":
            //-- show verify dialog
          var selectedNode = $("#tree").dynatree("getActiveNode");
          if(selectedNode == null) 
               break;
          var parentTitle = selectedNode.parent.data.title;
          if( parentTitle == "Error" || parentTitle == "To Lab" || parentTitle == "From Lab" )
                $('#dialog-confirm').dialog('open');
                 break;
        default:
                 alert("Invalid action '" + action + "' to node " + node);
    }
    

    I just check that the proper type node is selected to be able to take the action (look at parent, which is the containing folder).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using jquery, how can I find the first div that contains an input with
Using jquery how can one add a black border around all p elements that
Using jQuery I can easily get the number of DOM elements used by a
Using jQuery , how can I dynamically set the size attribute of a select
Using jQuery, is there a way to select all tag that reference a specific
I have a web app (JSPs and Servlets along with jQuery) that I am
I'm using jQuery's dynaTree in my application and I want to select the all
Using jQuery, one can easily find out whether a particular element is visible using
Using JQuery I am trying to perform validation and also get the values of
Using jquery, How can I create multiple draggables using loops through javascript? I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.