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

  • SEARCH
  • Home
  • 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 9129639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:47:43+00:00 2026-06-17T07:47:43+00:00

I used dijit/MenuItem in a popup menu for the JS Canvas object. When user

  • 0

I used dijit/MenuItem in a popup menu for the JS Canvas object. When user right click the Canvas, I want to show the menu and disable some items based on the location that user selected. Hence, I code in the onmousedonw event of the Canvas to disable the item.

Everything works fine except that when I right click and the menuitem change from enabled to disabled, the item in the menu is still showing as normal state until I move mouse over it and then it shows gray as disabled. Is there a way that I can somehow “refresh” the menuitem after changing the disabled state so that it will be shown as grayed out immediately when the menu show?

HTML for the menu

<ul dojoType="dijit/Menu" id="menu" style="display: none;border-radius:3px;">
<div dojoType="dijit/MenuItem" id="Popup_Cut"><span>Cut</span></div></ul>

JS for the disable

function handleMouseDown(event) {

 if(...)
     dijit.byId("Popup_Cut").disabled = true;
}
  • 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-06-17T07:47:44+00:00Added an answer on June 17, 2026 at 7:47 am

    Instead of using the property disabled, use the set method instead:

    dijit.byId('Popup_Cut').set("disabled",true);
    

    Had the same problem, and this worked for me.

    More info on set:
    http://dojotoolkit.org/reference-guide/1.8/dijit/info.html#set-and-get

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

Sidebar

Related Questions

I used the phonegap website to create an IPA file. Now I want to
I used Session[EmpName] = Convert.ToString(Request.QueryString[1]); lblEmployeeName.Text = Session[EmpName].ToString; to show the data in label
My original python program used string interpolation to take a number a user enters
Can somebody show me how to set slider (Dojo slider) on some value ?
I have some problems getting the custom formated JSON data into a dijit.form.FilteringSelect. It
I used this method to encode base64 string in object-c, but the app was
I used form user control(instead of form in C# winform). In this user control,
I am confused about the pattern used in my Regular Expression. What I want
I have an old web app where Javascript is used to validate some dates.
I have a problem with dijit editor of dojo: I used execCommand to insert

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.