Solved

Radio button and "Readonly"

Posted on 2003-10-29
5
5,965 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Uploading files to the web server has become common part of almost any kind of web application. People use different technologies to solve this, but regardless of the technology used, it is always useful to have some kind of progress indicator shown…
I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…

760 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

18 Experts available now in Live!

Get 1:1 Help Now