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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:25:10+00:00 2026-06-14T16:25:10+00:00

I have a page with 7 dijit FilteringSelect widgets that I want to connect

  • 0

I have a page with 7 dijit FilteringSelect widgets that I want to connect to stores fetched from the server if the user clicks on the widget or the widget otherwise gains focus. I want the event to fire one time.

If I add onfocus=”loadDropDown(this)” to my markup, it executes every time the widget gains focus, as you would expect.

I’m trying to use dojo to fire the event one time using on.once(). The function to use dojo event handling is running but the event handler function never gets called when a widget gains focus.

Any pointers?

This is my markup

<select data-dojo-type="dijit.form.FilteringSelect"
                        type="text" intermediateChanges="false"
                        data-dojo-props="required:false, pageSize:20, placeholder: '---'"
                        scrollOnFocus="true" name="CJ1lxA" style="width: 40em;"
                        id="searchAgency">
                    </select>

This is to regester the events

function registerDDLoad(){
require(["dojo/on", "dijit", "dojo/ready"], function(on, dijit, ready){
    ready(function(){
        var dropDown = dijit.byId("searchAgency");
        on.once(dropDown, "onfocus", function() {
            loadDropDown(dropDown);
        });
        dropDown = dijit.byId("searchLocation");
        on.once(dropDown, "onfocus", function() {
            loadDropDown(dropDown);
        });
        dropDown = dijit.byId("searchCounty");
        on.once(dropDown, "onfocus", function() {
            loadDropDown(dropDown);
        });
        dropDown = dijit.byId("searchRep");
        on.once(dropDown, "onfocus", function() {
            loadDropDown(dropDown);
        });
        dropDown = dijit.byId("searchSenate");
        on.once(dropDown, "onfocus", function() {
            loadDropDown(dropDown);
        });
        dropDown = dijit.byId("searchStatus");
        on.once(dropDown, "onfocus", function() {
            loadDropDown(dropDown);
        });
        dropDown = dijit.byId("searchAE");
        on.once(dropDown, "onfocus", function() {
            loadDropDown(dropDown);
        });
    });
});
}

registerDDLoad();
  • 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-14T16:25:11+00:00Added an answer on June 14, 2026 at 4:25 pm

    The dojo event class, dojo/on expects events to be specified without the ‘on’:

    onFocus = focus
    onClick = click
    onMouseOut = mouseout
    ...
    

    I think changing that should fix your problem. I’ve copied your code into test area on jsFiddle, so you can play around with it.

    NB: Since you are re-using the dropdown variable, it will always equal the last filteringSelect (id=searchAE) and never the earlier ones.

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

Sidebar

Related Questions

I have a page that uses several dijit form widgets. I also have an
I have the following code in my page that creates a new Dojo/Dijit TabContainer.
I have page which is redirected from htaccess. now I can pass the German
I have a website that does not have page refreshes when the visitor navigates
I have a combo box and a datagrid in my page. when the user
I'm using dojo and dijit and have an inlineEditBox widget. I'm trying to capture
I have a DataGrid that is loaded from an XML data store, all created
I have a custom widget, defined similar to this: dojo.declare('myWidget', [dijit._WidgetBase, dijit._Templated], { 'templateString':'<span>'
I have a page (and divs) that are being dynamically generated and what I
I have a page that has multiple parts of the page loaded via ajax,

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.