HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old July 20th, 2004, 02:53 PM
JayD JayD is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Location: Boulder, CO
Posts: 35 JayD User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
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.

Reply With Quote
  #2  
Old July 21st, 2004, 03:54 AM
selwonk's Avatar
selwonk selwonk is offline
Contributing User
ASP Free Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2004
Posts: 2,942 selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 6 Days 9 h 49 m 28 sec
Reputation Power: 62
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

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > Readonly Checkboxes


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT