|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Readonly Checkboxes
HTML doesn't support the readonly attribute for Checkboxes. But does anyone know a sneaky way to prevent users from updating Checkboxes.
Or anything close. I would like to use something like checkboxes to indicate that a user has entered data for a record on a page, like the following. [x] Disneyworld [ ] Universal Studios [ ] Seaworld Thanks in advance for your help. |
|
#2
|
||||
|
||||
|
Hi
The DISABLED element will work: Code:
<html> <head> <title>Disabled checkbox example</title> </head> <body> <form name="form1" method="post" action="test.asp"> <p> <input type="checkbox" name="checkbox" value="checkbox"> Option 1<br> <input type="checkbox" name="checkbox2" value="checkbox" checked disabled> Option 2 </p> <p> <input type="submit" name="Submit" value="Submit"> </p> </form> </body> </html> The ASP script to read the FORM collection: Code:
<% For Each str_ItemFound In Request.Form Response.Write(str_ItemFound & "=" & Request.Form(str_ItemFound) & "<br>") Next %> will return: Code:
checkbox=checkbox Submit=Submit even though "checkbox2" is also checked MK |
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > Readonly Checkboxes |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|