Solved

Lock Form Controls

Posted on 2014-01-22
3
320 Views
Last Modified: 2014-01-27
Is it possible to lock a drop-down menu? I have copied a form page and want to use it as a readonly, but readonly does not prevent a new selection from a drop-down list.
0
Comment
Question by:slegy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 33

Accepted Solution

by:
Big Monty earned 100 total points
ID: 39800969
why not just have whatever text that the dropdown displays be what you display? this seems pretty counter-intuitive to me...

if you must use a dropdown and make it read-only, use the disabled attribute:

<select name="selectBox" disabled="disabled">

you can also get away with <select name="selectBox" disabled>
0
 
LVL 53

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 100 total points
ID: 39801897
If possible, programmatically offer just one choice.  

<select name="membership">
<%
dim options(2)
options(0) = "choice1"
options(1) = "choice2"
options(2) = "choice3"

page = "xyz"
if page <> "xyz" then
   for each choice in options
      response.write "<option value="""&choice&""">"&choice&"</option>"
   next
   else
    response.write "<option value=""Choice1"">Choice1</option>"
end if

%> 
</select>

Open in new window

0
 

Author Closing Comment

by:slegy
ID: 39813800
I know this was a bit weird. It had a lot to do with wanting a form to operate exactly as another one does (lengthy and complicated) without doing any reprogramming. The disabled attribute works well for now, but I'll have to redo in the future due to IE11 and may want to go the other route. Thank you both.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question