Solved

Hide disabled drop down

Posted on 2014-02-06
5
251 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
Comment Utility
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
Comment Utility
But I can not hide the  disabled drop down
0
 
LVL 58

Expert Comment

by:Gary
Comment Utility
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
Comment Utility
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
Comment Utility
instead of hiding the parent

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

try giving the parent an ID and hide it directly

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

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now