Solved

Radio button and "Readonly"

Posted on 2003-10-29
5
5,977 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

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.
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
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…
The viewer will learn how to dynamically set the form action using jQuery.

724 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