Solved

Hide disabled drop down

Posted on 2014-02-06
5
258 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

815 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

8 Experts available now in Live!

Get 1:1 Help Now