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 8486845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:04:18+00:00 2026-06-10T21:04:18+00:00

I have a combobox for which I have a validation that a change in

  • 0

I have a combobox for which I have a validation that a change in selection should be reverted back on meeting a condition.

I have detected the condition but when I change the value and displayedValue of combobox, the onChange associated with the combobox gets fired. Following is the code I am using to change the selection:

dijit.byId('scheduleName').set('value',val,false);
dijit.byId('scheduleName').set('displayedValue',displayVal,false);

I have also tried to set the onChange to blank before firing above code and then re attaching the onChange code as below:

dojo.connect(dijit.byId('scheduleName'),'onChange','');
dijit.byId('scheduleName').set('value',scheduleNameVal,false);
dijit.byId('scheduleName').set('displayedValue',trim(String(scheduleNameName)),false);
dojo.connect(dijit.byId('scheduleName'),'onChange', "hideGrid");

hideGrid is a javascript function. I am using Dojo 1.8

  • 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-10T21:04:19+00:00Added an answer on June 10, 2026 at 9:04 pm

    You should use dojo.disconnect instead of

    dojo.connect(dijit.byId('scheduleName'),'onChange','');
    

    Example:

    var hndl, sched = dijit.byId('scheduleName');
    var fnWireOnChange = function(){
      hndl = dojo.connect(sched,'onChange', 'hideGrid');
    };
    
    dojo.disconnect(hndl);
    sched.set('value',scheduleNameVal,false);
    sched.set('displayedValue',trim(String(scheduleNameName)),false);
    fnWireOnChange();
    

    As a side note, connect/disconnect has been deprecated in favor of dojo/on

    https://dojotoolkit.org/reference-guide/1.8/dojo/on.html#dojo-on

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

Sidebar

Related Questions

I have a JSON data store used for a combobox selection which is working
I have an Combobox which is poplated with data that is time sensitive. My
I have a combobox with multi selection. when i click on add button, which
I have a datagridview with a bound combobox column which contains decimal value. There
I have a ComboBox which content might change. The issue is when the content
I have a WPF ComboBox which is databound to a Collection, but depending on
I have got ComboBox which is populated with collection of customTypes. On comboBox change,
i have a combobox which is displaying date from database...in my database the date
I have a combobox which is populated by the Keys enumeration (winforms). The problem
I have a combobox from which i need to programmatically disable items depending on

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.