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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:11:45+00:00 2026-05-14T22:11:45+00:00

I have a dijit.form.Select widget. It’s tied to a data store, if that matters.

  • 0

I have a dijit.form.Select widget. It’s tied to a data store, if that matters. It’s filled with several options already. All I want to do is programmatically set its value. I can get its value using myWidget.attr('value') but if I try to do myWidget.attr('value', 5) for example (where 5 is one of the valid values), all it does is reset the widget to select the very first option, no matter what value I give it.

This seems to be a bug, and there aren’t any tests or documentation which show how to accomplish what I want to. But is there some way, even if it’s a dirty hack?

I’m using Dojo 1.4.0. Note that dijit.form.Select is the new name for dojox.form.DropDownSelect.

edit: I even tried resetting the widget with all new options, but it ignores the option which has selected = true and just selects the first option. There must still be a way though.

  • 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-14T22:11:46+00:00Added an answer on May 14, 2026 at 10:11 pm

    Even if your values are ints, if you set your integer to a string then this will work.

    dijit.byId( 'my_select' ).attr( 'value', String( 5 ) );
    
    • 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 a dijit.form.NumberTextBox input field that starts out with these parms: new dijit.form.NumberTextBox({
I have a dijit validationtextbox widget: <input dojoAttachPoint=tbIPAddress type=text size=15 class=ipaddress dojoType=dijit.form.ValidationTextBox required=true regExp=^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$
I have a programmatically generated dijit.form.Select. Unlike most other widgets, the Selects do not
I'm having some issues with dijit.form.Select items. In a page i have two of
I have a form with a table that has two input boxes, a select
I have some problems getting the custom formated JSON data into a dijit.form.FilteringSelect. It
I have a dijit.form.Select on my page: <c:set var=qualId value=${previous.qualification.id} /> <select id=qualification name=qualification
Hey guys! I have a dijit.form.ComboBox that needs have value checking applied against it.
I have a dijit.form.FilteringSelect component and I want to change the options dynamically. But

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.