Solved

Lock Form Controls

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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

777 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