Hide disabled drop down

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
LVL 19
erikTsomikSystem Architect, CF programmer Asked:
Who is Participating?
 
DualCoolConnect With a Mentor Commented:
instead of hiding the parent

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

try giving the parent an ID and hide it directly

$("#triggerSeed2_parent").hide();
0
 
GaryCommented:
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
 
erikTsomikSystem Architect, CF programmer Author Commented:
But I can not hide the  disabled drop down
0
 
GaryCommented:
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
 
Sar1973Commented:
To show/hide: document.getElementById("myCombo").style.display="inline"/"none";
To enable/disable: document.getElementById("myCombo").disabled=true/false;
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.