Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Lock Form Controls

Posted on 2014-01-22
3
Medium Priority
?
352 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 34

Accepted Solution

by:
Big Monty earned 400 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 54

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 400 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Screencast - Getting to Know the Pipeline

885 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