Solved

Hide disabled drop down

Posted on 2014-02-06
5
265 Views
Last Modified: 2014-03-12
I need to hide disabled drop down. The problem is I have I have 2 variables if the drop down is disabled i ma using the hidden form variable but the drop down itself need to be hidden

if I do this it probably taking the hidden form variable.

$("#triggerSeed2").parent().hide();

the reason I doing it this way because under certain condition the drop down will be disabled, but other fields are still using the value from it. I thought if I disable the drop down and enable the hidden form variable that will work and it does but i need a way of hiding the drop down
0
Comment
Question by:erikTsomik
5 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 39839175
Doesn't matter if it is hidden or disabled you can still get the selected value from it.
Anything other than that I am not understanding.
0
 
LVL 19

Author Comment

by:erikTsomik
ID: 39839732
But I can not hide the  disabled drop down
0
 
LVL 58

Expert Comment

by:Gary
ID: 39839748
Post your code. There is no reason you cannot hide it. Maybe you are targeting the wrong element.
Here's a simple example.
http://jsfiddle.net/3nq89/
0
 
LVL 9

Expert Comment

by:Sar1973
ID: 39841472
To show/hide: document.getElementById("myCombo").style.display="inline"/"none";
To enable/disable: document.getElementById("myCombo").disabled=true/false;
0
 
LVL 2

Accepted Solution

by:
DualCool earned 500 total points
ID: 39860594
instead of hiding the parent

$("#triggerSeed2").parent().hide();

try giving the parent an ID and hide it directly

$("#triggerSeed2_parent").hide();
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Find out what you should include to make the best professional email signature for your organization.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: blockā€¦
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question