Solved

Radio button and "Readonly"

Posted on 2003-10-29
5
5,974 Views
Last Modified: 2008-08-13
I would like to be able to "lock" a radio button much in the same way that a text field can be "locked" using the Readonly property.  I have tried the Disable property but it changes the appearance of the radio button.  I am looking for something that doesn't change the appearance but still locks the control.
0
Comment
Question by:TheChos
5 Comments
 
LVL 2

Expert Comment

by:hb21l6
ID: 9642311
I dont think you can do this which only leaves you two options.

1. have a picture that looks like a radio button or

2. have a dead button on the screen that doesn't do anything.


sorry

hb
0
 
LVL 35

Expert Comment

by:YZlat
ID: 9642347
<input type="radio" name="radio1" style="color: #000000">
0
 
LVL 12

Accepted Solution

by:
Dean OBrien earned 250 total points
ID: 9642377
This might be a long winded way of doing it...

But have an <div> containing a picture with transparent background.  Absolutely position it above the radio button.  Depending upon the events leading to the radio button becoming 'locked', alter the z-index of the div and the radio button.  Thus not changing the appearance of the button yet making it unavailable.

i.e.
OPEN
--------------- radio button    (z-index=2)
--------------- invisible div     (z-index=1)

LOCKED
---------------invisible div     (z-index=2)
---------------radio button    (z-index=1)

The problem be positioning the div over the radio button. (are you using CSS to layout).  Have a go any way.

Easynow

0
 
LVL 2

Expert Comment

by:errows
ID: 9642810
<input type="radio" value="1" readonly="readonly" checked="cheked" />Radio

Seems to work properly no?
0
 
LVL 2

Expert Comment

by:grossac
ID: 9643548
Take a look at this previous message. It seems to address this issue quite well.

http://www-level3.experts-exchange.com/Web/Web_Languages/HTML/Q_20661287.html
0

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

808 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