[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Radio button and "Readonly"

Posted on 2003-10-29
5
Medium Priority
?
6,008 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 500 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
Suggested Courses
Course of the Month19 days, 20 hours left to enroll

872 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