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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drop-down List Problem

Status
Not open for further replies.

devhelp

Programmer
Mar 29, 2006
3
CA
Hi people

I have a drop down list box and I want to disable 2 items in it. For example

Code:
<select name = "liststatus">
<%= showstatus %> 
>

Now showstatus is a String variable that is calculated earlier. Consider that showstatus has the following value
showstatus = "Approved Denied Waiting". The above code shows all 3 of them. Now what I want to do is that I would like to disable "denied", so that "denied" does exist in the list but cannot be selected by the user.

Can anyone suggest a way of doing this. What I have tried is a "replace" function in java in which I replaced denied with "", but this way it keeps a blank row in the list box, I dont like this. I would like to see "denied" in the list but I want to make it disabled so that it cannot be selected.

Any suggestions will be highly appreciated.

Thanks


 
I can think of a way to do it using JavaScript.

Ask in the JavaScript forum (forum216).

Dave

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...east is east and west is west and if you take cranberries and stew them like applesauce
they taste much more like prunes than rhubarb does
[infinity]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top