Solved

Lock Form Controls

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

Accepted Solution

by:
Big Monty earned 100 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now