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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T14:48:57+00:00 2026-06-03T14:48:57+00:00

I have 2 drop down lists, ddl1 and ddl2. I use javaScript so that

  • 0

I have 2 drop down lists, ddl1 and ddl2. I use javaScript so that if ddl1 changes to a specific value, ddl2 becomes disabled and defaults to an item in it’s list. This works fine.

However, when I click “Add”, which posts back to the server, the value from ddl2 isn’t set to what the javaScript set it.

How do I make that value available server side? I am assuming I need to make an AJAX call.

  • 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-03T14:49:01+00:00Added an answer on June 3, 2026 at 2:49 pm

    Disabled form fields do not get posted when you submit the form. They are treated as though they don’t exist. You could try setting a hidden field via your JavaScript and then looking for that field on the server side. In fact, you could name the hidden field the same as the 2nd dropdown, but please don’t forget to remove the hidden field if you once again enable the dropdown.

    Also, as mentioned in the comments, you could make the dropdown “readonly” instead of “disabled” and it should avoid this problem.

    I hope that helps!

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

Sidebar

Related Questions

I have two drop down lists: <select name="branch"> <option value="b">Blacksburg</option> <option value="c">Christiansburg</option> <option value="f">Floyd</option>
I have three drop down select lists, when a value from one of the
Currently, I have two drop down lists that are populated with users' first and
I have 2 drop down lists , and value of the second drop down
So, I have three drop down lists that are related to each other: CountryDDL
I have a situation where I have multiple drop down lists that are hidden
I have two drop down lists. Second one is populated based on value chosen
I have a page that has two drop down lists on it and a
I have a drop-down that lists font families. Like Tahoma, Arial, Verdana, etc. I
I have a form that contains 5 drop down lists which are created by

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.