Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unavailable list box 2

Status
Not open for further replies.

TruthInSatire

Programmer
Aug 12, 2002
2,964
US
How do i "grey out" a list box so it can not be used but displays the value? How many software developers does it take to change a light bulb?
None: it works in everyone else’s office, it must work in yours too.
 
In HTML, add the disabled attribute to it :
Code:
<Select id=&quot;Myselect&quot; ... DISABLED>..</SELECT>
In Script :
Code:
var oSel= getElementById(&quot;Myselect&quot;);
oSel.disabled=true;

Water is not bad as long as it stays out human body ;-)
 
I presume this is what you mean...

<SELECT id='myselect disabled>
<option value=&quot;1&quot;>1</option>
</select>
 
I put the points because I'm too lazy to write a full html tag !!! Water is not bad as long as it stays out human body ;-)
 
perfect thank you How many software developers does it take to change a light bulb?
None: it works in everyone else’s office, it must work in yours too.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top