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!

Dynamically making ListBox Readonly

Status
Not open for further replies.

MillsRJ

Technical User
Sep 14, 2002
28
CA
I have a list of users that have accesslevel of 1,2 or 3

Level 1 users should not be able to change the contents of a listbox, level 2 and 3 should

here's what I've got

<% if session(&quot;AccessLevel&quot;)=1 then
enablelist = &quot;False&quot;
else
enablelist = &quot;True&quot;
end if

%>

<select name=&quot;select&quot; size=&quot;1&quot; READONLY = <%= enablelist %>>
</select>

I don't want to use DISABLE because I need to pass the value to the next list box (and the next page eventually)

any help is appreciated.

thanks

Rob Mills
System Analyst
Correctional Services Canada
(all statements are my own and do not reflect on my employer)
 
<select name=&quot;select&quot; size=&quot;1&quot; <%IF enablelist = FALSE then%>READONLY<%End If%>> Should do it.
 
thanks, I'll try it out, though I've since read that READONLY won't work so I'll have to use Disabled

Rob Mills
System Analyst
Correctional Services Canada
(all statements are my own and do not reflect on my employer)
 
well, READONLY will work in most cases but, READONLY will not pass the form object when submit'd. That is the reasoning for the DISABLED attribute. basically I've never found a valid use of READONLY. if you don't want it to be used in any way then you should get a graphics bit and make a image of the thing you don't want to use. [wink]

_____________________________________________________________________
You can accomplish anything in life, provided that you do not mind who gets credit.
Harry S. Truman

onpnt2.gif

 
I completely said that backwards [lol]

DISABLED does not submit the value READONLY does

god I need a new coffee maker

_____________________________________________________________________
You can accomplish anything in life, provided that you do not mind who gets credit.
Harry S. Truman

onpnt2.gif

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top