Solved

Lock Form Controls

Posted on 2014-01-22
3
308 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
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 52

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
sql to convert to date IF entry is in date format 4 93
Microsoft SQL ADO Conn Issue 6 50
ASP/VB email question 4 46
One field not displaying content (ASP Classic) 8 29
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

839 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