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 freeze

Status
Not open for further replies.

wwworg

Programmer
Feb 10, 2006
35
CA
Hey guys

I have a dropdown list in HTML

How can I freeze that drop-down list so that the user cannot change (meaning cannot select any other item from the list). I have used the disabled "true", but this is causing a little problem for me. So I was wondering maybe anyone knows about any other way to freeze a drop-down list in HTML

Thanks
 
I believe the correct syntax for disabling a field is to set the disabled attribute like so:

Code:
<input type="button" disabled="disabled" name="button" value="button" />

- George
 
Thanks for your reply

It is the same thing

disabled = "true" or disabled = "disabled". It does the same thing. Also it is not an input type, its a select

Code:
<select class="tx" name="applstatus" <%  if (empRole == false) { %>
		disabled = "disabled" <% } %> >
	}
	<%= mad.getApplStatusOptions() %>
	</select>

Just wondering if there is any other way to restrict the user to edit the list

Let me know if u have any ideas

Thanks
 
but this is causing a little problem for me

What exactly is the problem you are having? Is the list NOT disabled, despite putting disabled="disabled" in the tag?

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