Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old February 24th, 2006, 07:34 AM
Friend of Wrox
 
Join Date: May 2005
Location: , , Norway.
Posts: 189
Thanks: 0
Thanked 0 Times in 0 Posts
Default radio-button

Hei!

Does a group of radio-buttons (they all ahve the same name) need to have one of then set to checked="checked"?
   And if so, can I have multiple groups of radio-buttons in the same form?

Regards from grstad

__________________
Internet has become favorable with that tool...thank you Tim Berners-Lee!
  #2 (permalink)  
Old February 26th, 2006, 09:51 AM
Friend of Wrox
 
Join Date: Nov 2005
Location: Rotterdam, , Netherlands.
Posts: 223
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

Question number 1.
Correct me if I'm wrong. But do you mean that when you have check boxes that one always is checked by default. In that case the awnser is no. How ever in some situations it is very handy to have one checked by default for example when you work with a database and you don't want a empty value.

Question number 2.
If you have multiple questions and you like to awnser these with radiobuttons. All these questions can be awsered by radio buttons as long as thes groups have different names.

Let me know if this awsers your question

__________________________________________________ ________
This is my junk I'm gona eat it
  #3 (permalink)  
Old February 28th, 2006, 08:20 AM
Friend of Wrox
 
Join Date: May 2005
Location: , , Norway.
Posts: 189
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hei!
1) I mean radio-buttons. Do one of the buttons in each group, need to be checked by default in order to function. All of the groups are in the samme form, sorting under the same submit-button with action set to some .asp-file.

2) Each group, different names - OK!

Regards grstad

  #4 (permalink)  
Old February 28th, 2006, 08:32 AM
Friend of Wrox
Points: 1,315, Level: 14
Points: 1,315, Level: 14 Points: 1,315, Level: 14 Points: 1,315, Level: 14
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , .
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

It's recommended, yes.

"At all times, exactly one of the radio buttons in a set is checked. If none of the <INPUT> elements of a set of radio buttons specifies `CHECKED', then the user agent must check the first radio button of the set initially.

Since user agent behavior differs, authors should ensure that in each set of radio buttons that one is initially "on"."
http://www.w3.org/TR/html401/interact/forms.html#radio


--
http://yupapa.com


Similar Threads
Thread Thread Starter Forum Replies Last Post
Radio button gaurisharya C# 2005 2 March 16th, 2008 06:43 AM
radio button anwarraja Javascript 3 September 18th, 2007 08:18 PM
Radio button Jolley_tolson Javascript 2 July 15th, 2007 05:50 AM
Button acts depending on radio button values janise Access 4 March 10th, 2004 12:53 AM
radio button damnnono_86 Access 5 October 28th, 2003 02:17 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.