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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:12:48+00:00 2026-05-27T01:12:48+00:00

I have the following: var test = dojo.byId(clientDivision); test.style.display = ‘block’; in a function

  • 0

I have the following:

var test = dojo.byId("clientDivision");
test.style.display = 'block';

in a function that is getting called as part of an “onChange” of a select.

here is the div I am trying to display:

<tr id="divisionInputRow" name="divisionInputRow">
<div id="clientDivisionDiv" >
    <td><label>Org:</label></td>
    <td name="inputDivisionCell" id="inputDivisionCell" class="inputData">

        <div dojoType="customdojo.stores.QueryReadStore" jsId="divisionStore"
        queryTable="" url="/SkillsDB/autocomplete/buildClientDivisionList"
        requestMethod="post"></div>
        <select id="clientDivision" name="clientDivision.name" style ="display:none"
            value="${project?.clientDivision?.encodeAsHTML()}"
            dojoType="dijit.form.ComboBox" pageSize="15"
            onChange="setCbHiddenId(this, 'clientDivision.id')"
            required="true"
            invalidMessage="Invalid Client Division"
            promptMessage="Enter client division for this project">
        </select>
        <input type="hidden" id="clientDivision.id" name="clientDivision.id" value='${project?.clientDivision?.id}' />          
    </td>
</div>
</tr>

so as you can see, there is a select

 <select id="clientDivision" name="clientDivision.name" style ="display:none"

where i am explicitly setting style to “display:none” so that it’s hidden when page loads, I just want to unhide it after an event.

However, the code inmy function doesnt seem to do anything.

Thanks

  • 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-05-27T01:12:48+00:00Added an answer on May 27, 2026 at 1:12 am

    When dojo parses your document, the <select> is turned into several tags, looking something like this:

    <div widgetid="clientDivision" style="display: none;" id="widget_clientDivision" role="combobox">
      <div class="dijitReset dijitRight dijitButtonNode dijitArrowButton ...>
        <input class="dijitReset dijitInputField dijitArrowButtonInner" ...>
      </div>
      ...
      <div class="dijitReset dijitInputField dijitInputContainer">
        <input value="${project?.clientDivision?.encodeAsHTML()}" id="clientDivision"
            name="clientDivision.name" type="text">
      </div>
    </div>
    

    Notice that the DOM node with id “clientDivision” is now hidden deep inside the tag soup. That’s why hiding/unhiding it doesn’t make sense.

    Your combobox is a widget at this point, so treating it like a DOM node (even though it’s technically still made up of DOM nodes) doesn’t work.

    You can hide the widget’s outermost DOM node like this:

    dijit.byId("clientDivision").domNode.style.display = "none";
    

    Notice that you have to use dijit.byId (not dojo.byId, which is only for DOM nodes, not widgets), and that you have to use its domNode member (which is a dijit’s outermost DOM node).

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

Sidebar

Related Questions

I have the following dummy test script: function test() { var x = 0.1
I have the following code - <script type=text/javascript> function test() { var results =
I have the following javascript code. var Test = function(){ $(#+elementId).click(function(){ // How to
I have a script that looks like this: var test = { something: function(m){
I'm trying replace the index of form elements. I have the following var test
I have the following: param=/var/tmp/test I need to replace the word test with another
I have the following app_controller in app/controller. the test function is never executed. If
In JavaScript let's say we have the following code var test = 'd'; if
Let's say I have following typed in my source file. var myFunction = function()
I have the following code var replyName = "1"; var test = "<div id=replyName></div>"

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.