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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T06:19:07+00:00 2026-06-15T06:19:07+00:00

I have a html button using dojotype attribute: <button id=btnSearchEmployees dojotype=dijit.form.Button> Search </button> and

  • 0

I have a html button using dojotype attribute:

<button id="btnSearchEmployees" dojotype="dijit.form.Button">
                        Search
                    </button>

and trying to use jQuery to handle click event on this button:

$("#btnSearchEmployees").click(function() {
    alert("test");
});

But it is not working, if I take out dojotype attribute, it works normally:

 <button id="btnSearchEmployees"> Search </button>

How can I avoid this?

Edit: Here is what dojo change:

<span class="dijit dijitReset dijitInline dijitButton" role="presentation" style="width: 70px;" widgetid="btnSearchEmployee">
    <span class="dijitReset dijitInline dijitButtonNode" data-dojo-attach-event="ondijitclick:_onClick" role="presentation">
        <span class="dijitReset dijitStretch dijitButtonContents" data-dojo-attach-point="titleNode,focusNode" role="button" aria-labelledby="btnSearchEmployee_label" tabindex="0" id="btnSearchEmployee">
            <span class="dijitReset dijitInline dijitIcon dijitNoIcon" data-dojo-attach-point="iconNode"></span><span class="dijitReset dijitToggleButtonIconChar">?</span>
            <span class="dijitReset dijitInline dijitButtonText" id="btnSearchEmployee_label" data-dojo-attach-point="containerNode">Search</span>
        </span>
    </span>
    <input type="button" value="" class="dijitOffScreen" tabindex="-1" role="presentation" data-dojo-attach-point="valueNode">
</span>
  • 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-15T06:19:08+00:00Added an answer on June 15, 2026 at 6:19 am

    You should use

    dojo.connect(dijit.byId("btnSearchEmployees"), "onClick", function(){
        alert("test");
    });
    

    It is because once you use dojoType(or data-dojo-type). The dojo parser will replace the original dom into the template which your dijit declares. The result may be completely different with what your markup writes(as showed by you). It generate a new id for the outermost dom. So what you actually click is not the original Button element. Then you have to use it as “dojo widget”, which can only retrieved via dijit.byId.

    If you are using dojo framework already, it has most features you need. You don’t have to use JQuery as well.

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

Sidebar

Related Questions

i have html form i am using <a href="#" onclick="document.aa.submit()"> instead of submit button
I have a cancel button in a form: @using (Html.BeginForm(ConfirmBid,Auction)) { some stuff ...
I have developed a PopupMenu using a jQuery plugin. When the HTML button is
I am trying to create a button using HTML/jQuery that is positioned on the
We have some HTML buttons which we format using JQuery - $('#button').button() . Works
I have ASP.Net code generating my button's HTML for me using divs to get
I'm adding HTML controls dynamically using java script. For instance, I have one button
I have been trying to make custom radio buttons using HTML, CSS, and JavaScript.
I have a HTML page on click of button i am displaying a Popup
I have a html form with no submit button. I want to submit that

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.