View Full Version : Disabling Radio Button
Help, I have a form which I am populating with data from an Oracle Database, I have two Radio Buttons (Male & Female). Now if the returning Data is for a female, I want the Radio Button for male to be disable.
03-17-2003, 01:32 PM
you could try
which should keep it how it is currently set
03-17-2003, 04:30 PM
Is this for an "update" or "edit" type of page? It sounds like you are looking up some data in the database and setting a bunch of fields based on what the user initially entered.
'open database and setup recordset first
'what did the user enter
<input type="radio" name="gender" value="female" <%if user_choice="female" then response.write "checked" else response.write "disabled"%>>female<br>
<input type="radio" name="gender" value="male" <%if user_choice="male" then response.write "checked" else response.write "disabled"%>>male<br>
edit: Oops, this will only work if you use ASP.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.