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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:52:36+00:00 2026-06-05T01:52:36+00:00

I am developing using dojo 1.7 and am getting an error.. My aim is

  • 0

I am developing using dojo 1.7 and am getting an error.. My aim is to move items from one multi select box to another. The page is long so I only copied the relevant parts.

Here’s my head js code and the problem comes after dojo.ready. The variable “newStore” works great so I know that is executing fine. it’s the dojo.query(“button.switch”) that seems to be the issue. The firebug error I get is

dojo.query("button.switch").connect is not a function

and this error is thrown on page load. The code is….

<script type="text/javascript">
require(["dijit/dijit"]);
require(["dojo/parser"]);
require(["dijit/layout/BorderContainer"]);
require(["dijit/layout/ContentPane"]);
require(["dijit/layout/AccordionContainer"]);
require(["dijit/layout/TabContainer"]);
require(["dijit/form/CheckBox"]);
require(["dijit/form/Button"]);
require(["dijit/form/ComboBox"]);
require(["dijit/form/NumberTextBox"]);
require(["dijit/form/SimpleTextarea"]);
require(["dijit/form/TextBox"]);
require(["dijit/form/Textarea"]);
require(["dijit/form/MultiSelect"]);
require(["clipart/ArrowLeft"]);
require(["clipart/ArrowRight"]);
require(["dijit/form/FilteringSelect"]);
require(["dijit/form/RadioButton"]);
require(["dijit/form/Select"]);
require(["dojox/layout/GridContainer"]);
require(["dojo/data/ItemFileReadStore"]);
require(["dijit/Tree"]);
require(["dojo/ready"]);


dojo.ready(function(){
var newStore = new dojo.data.ItemFileReadStore({
    url: "http://0:3000/sample/sample_name"
   });
   dijit.byId('sc_sample_name').set('store',newStore);

dojo.query("button.switch")
  .connect("onclick",function(e){
    switch(e.target.id.toString()){
      case "left" : dijit.byId("at2").addSelected(dijit.byId("at1")); break;
      case "right" : dijit.byId("at1").addSelected(dijit.byId("at2")); break;
    }
  });
});

</script> 

This is a page load issue which is why I am not including the HTML (which is huge). Has anyone seen this behavior before? Janie

  • 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-05T01:52:37+00:00Added an answer on June 5, 2026 at 1:52 am

    I think you are loading baseless dojo, i.e. your dojoConfig/data-dojo-config has an option async:true, which switches Dojo to baseless mode since version 1.7.

    Use query("button.switch").on("click", function(e) { ...}) instead of connect:

    require([
        "dojo/ready",
        "dojo/query"
    ], function(
        ready,
        query
    ) {
    
        ready(function() {
    
            query("button.switch").on("click", function(e) {
                console.log(e.target.id);            
            }); 
        });  
    });​
    

    or do not switch into baseless mode.

    Try it yourself at this jsFiddle: http://jsfiddle.net/phusick/LMdBd/, change async: true to async: false or delete it completely and connect will work:

    enter image description here

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

Sidebar

Related Questions

i am developing parser using bison...in my grammar i am getting this error Here
I am developing a web page using Dojo mobile v1.5.1. Below is the sample
While developing using ASP.net 2.0 (C#) and NHibernate 2.1.0 I am getting the error:
I am developing a web application using Spring JS and Dojo Toolkit. In this
I am developing using zend framework and doctrine2.1. I have generated entities from database.
I'm using git to test out a dojo widget I'm developing. I am developing
I am developing a mobile web app using dojo. I have a view with
I'm developing using JDE 4.5 which doesn't contain the PERMISSION_RECORDING, and it's denied by
I am developing using 3.0 and VS 2008. The problem is my build server
Help I'm very new with web developing using ASP.NET. Why is the my web

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.