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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T22:49:07+00:00 2026-05-28T22:49:07+00:00

Hi I have 3 Controls on my Razor Form. 1) combobox, 2) DropdownSelect 3)

  • 0

Hi I have 3 Controls on my Razor Form. 1) combobox, 2) DropdownSelect 3) Text Input.
First I select value from Combobox and as a result i add options to DropdownSelect. After i select a value from DropdownSelect, i want to enable or disable the 3rd input box.

I am able to populate 2nd Dropdown select when i select a value in 1st Combobox. But I am not able to enable or disable the 3nd input box based on 2nd Dropdown value change.

Here is sample Code.

<input type="text" dojoType="dijit.form.ComboBox" style="margin-top: 5px;" class="left" store="regionStore" queryExpr="${0}" hasDownArrow="true" 
    searchAttr="text" labelAttr="name" title="Region" id="Plan_RegionName" jsId="Plan_RegionName" name="Plan.RegionName" required="true" placeholder="None" ignoreCase="true" /> 

<select name="Plan.PlanType" id="Plan_PlanType" title="Plan Type" dojoType="dojox.form.DropDownSelect" required="true" maxHeight="125" labelwidth="185px" style="width: 180px">    
    <option value="" selected="selected">-- Select One --</option>    
    <option value="Trial">Trial</option>    
    <option value="PerUser">Per User</option>    
    <option value="PerUnit">Per Unit</option>    
    <option value="Reseller">Reseller</option>    
    <option value="Other">Other</option>    
</select>        
<div dojoType="dijit.form.ValidationTextBox" style="width: 180px; margin-top: 5px;" id="Plan_Name" title="Plan Name" name="Plan.Name" required=&quot;true&quot; 
    missingMessage="This value is required" promptMessage="Enter a value" value="">

<script text/type="javascript"> 
    dojo.addOnLoad(function () {
            dojo.connect(Plan_RegionName, "onChange", Plan_RegionName, function (evt) {
                alert("Combo box Changed!");
            });

            dojo.connect(Plan_PlanType, "onChange", Plan_PlanType, function (evt) {
                alert("Dropdown Changed!");
            });    
        });

</script>

I get the alert message for Combox box change but not for Dropdown change.

Any ideas. Please advice.

thanks,
Vivek

  • 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-28T22:49:08+00:00Added an answer on May 28, 2026 at 10:49 pm

    I used the onChange event of Selectbox.
    Here is the example.

    <select name="@name" id="@id" title="@ViewData.ModelMetadata.GetDisplayName()" onChange="enablePlanname(this.getValue())" dojoType="dijit.form.ComboBox" required="true" maxHeight="125" style="width: 180px; margin-top: 5px;">
    @if (String.IsNullOrEmpty(Model))
    {
        <option value="" selected="selected">-- Select One --</option>
    }
    @foreach (CurrencyType bt in Enum.GetValues(typeof(CurrencyType)))
    { 
        bool selected = false;
        if (bt.ToString() == Model)
        {
            selected = true;
        }
        <option value="@bt.ToString()"@(selected ? " selected=\"selected\"" : "")>@bt.GetDisplayName()</option>
    }
    </select>
    
    <script type="text/javascript">
    
    function enablePlanname(value) {
            var CurrentTextBox = dijit.byId('Region_Currency');
            if (value == "other") {            
                CurrentTextBox.set("disabled", false);
            }
            else {
                CurrentTextBox.set("disabled", true);
            }
        }
    
    </script>
    

    Thanks for all your help.

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

Sidebar

Related Questions

I have several controls on my form and on changed event the logic entity
I have a Controls.Canvas with several shapes on it and would like to add
When I have many controls on a Form (i.e. Label, Button etc) that do
I have online form builder appplication in ASP.NET MVC3 with Razor views. It is
I have a MVC 3 application with Razor. The form is data driven and
Simple question... I have controls that the user can drag around on my form
WPF controls have certain properties (UserControl.Resources, UserControl.CommandBindings) that can have items added to them
I have two controls on a page, one is a search entry and submission
I have 3 controls with id control_1 , control_2 , control_3 . I want
I have picker controls on a single view with two outlets for each. When

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.