iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-13-2009, 05:11 PM
WebProWorld New Member
 
Join Date: Apr 2009
Location: Johannesburg, South Africa
Posts: 16
gazza777 RepRank 0
Default Radio Button Problem

Hi all,

I'm a fairly newbie, with no formal training so as I come across these niggling issues I turn to guys like yourselves!

I created a form to email page which collects data on a possible order online and mails it to me. My problem comes with the radio buttons I have made.

For some reason it will only allow me to select the first radio button in a group. I have two instances in the form where I use radio buttons and they both the same. Sure it's the simplest thing, but obviously have no idea how to fix it!

And the code is -

<input type="radio" name="Hosting Package" id="9" value="A - Active" />
A - Active (R49p/m)<br />
<input type="radio" name="Hosting Package" id="10" value="B - Business" />
B - Business (R69p/m)<br />
<input type="radio" name="Hosting Package" id="11" value="C - Connoisseur" />
C - Connoisseur</label>
(R99p/m)

and

<input type="radio" name="Website Quote" id="13" value="Yes" />
Yes<br />
<input type="radio" name="Website Quote" id="14" value="No" />
No

Any assistance will be much appreciated!

Rgrds

Gary
Reply With Quote
  #2 (permalink)  
Old 07-13-2009, 05:59 PM
wige's Avatar
Moderator
WebProWorld Moderator
 
Join Date: Jun 2006
Location: United States
Posts: 2,657
wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9
Default Re: Radio Button Problem

I'd probably have to see it, but first, try losing the id attribute and see if that has an effect. It shouldn't, but it might. Beyond that, have to see the full page in action.
__________________
The best way to learn anything, is to question everything.
Reply With Quote
  #3 (permalink)  
Old 07-13-2009, 06:02 PM
Uncle Dog's Avatar
WebProWorld Pro
 
Join Date: Apr 2008
Location: Scotland
Posts: 268
Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5
Default Re: Radio Button Problem

I've just copied your markup into a very basic html doc...

<html>
<head></head>
<body>

<input type="radio" name="Hosting Package" id="9" value="A - Active" />
A - Active (R49p/m)<br />
<input type="radio" name="Hosting Package" id="10" value="B - Business" />
B - Business (R69p/m)<br />
<input type="radio" name="Hosting Package" id="11" value="C - Connoisseur" />
C - Connoisseur</label>
(R99p/m)

<br />

<input type="radio" name="Website Quote" id="13" value="Yes" />
Yes<br />
<input type="radio" name="Website Quote" id="14" value="No" />
No
</body>
</html>

and it works in FireFox 3 & IE 7

I'm wondering about the </label> tag in your markup at the end of C. Where does that start?

OK... found it. If you enclose the radio buttons with a <label>...</label> you can only select the first item.

Last edited by Uncle Dog; 07-13-2009 at 06:08 PM. Reason: Found it
Reply With Quote
  #4 (permalink)  
Old 07-13-2009, 06:22 PM
WebProWorld New Member
 
Join Date: Apr 2009
Location: Johannesburg, South Africa
Posts: 16
gazza777 RepRank 0
Default Re: Radio Button Problem

Hey wige, I started with no ID tabs - that prevented me from selecting the 2nd set of radio buttons.

Uncle dog - noticed that </label> tag in there and have no idea why it's there but if I change it to <br /> it screws the whole thing up! How should it end?

I see I can post a link now - the site is here:

Creating WebSphere Wen Hosting Order Form

Thanx again guys.
Reply With Quote
  #5 (permalink)  
Old 07-13-2009, 06:32 PM
Uncle Dog's Avatar
WebProWorld Pro
 
Join Date: Apr 2008
Location: Scotland
Posts: 268
Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5
Default Re: Radio Button Problem

Just remove the </label> tag, replace it with a space.
If you can find the starting tag <label> somewhere before there in the doc, remove that too.

You want it to look something like this

<input type="radio" name="Hosting Package" id="9" value="A - Active" />A - Active (R49p/m)<br />
<input type="radio" name="Hosting Package" id="10" value="B - Business" />B - Business (R69p/m)<br />
<input type="radio" name="Hosting Package" id="11" value="C - Connoisseur" />C - Connoisseur (R99p/m)<br />
Reply With Quote
  #6 (permalink)  
Old 07-13-2009, 06:42 PM
Uncle Dog's Avatar
WebProWorld Pro
 
Join Date: Apr 2008
Location: Scotland
Posts: 268
Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5
Default Re: Radio Button Problem

Just been looking at the source of your site. It's littered with <label> tags for no apparent reason.

Read Forms in HTML documents for their proper use.
Reply With Quote
  #7 (permalink)  
Old 07-13-2009, 06:43 PM
WebProWorld New Member
 
Join Date: Apr 2009
Location: Johannesburg, South Africa
Posts: 16
gazza777 RepRank 0
Default Re: Radio Button Problem

Got it - perfect now!!

Thanx a million Uncle Dog
Reply With Quote
  #8 (permalink)  
Old 07-13-2009, 06:45 PM
Uncle Dog's Avatar
WebProWorld Pro
 
Join Date: Apr 2008
Location: Scotland
Posts: 268
Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5Uncle Dog RepRank 5
Default Re: Radio Button Problem

Glad to help.
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Google Buys Radio Ad Firm; AdWords Headed To Radio Distribu WPW_Feedbot Search Engine Optimization Forum 0 01-17-2006 10:30 AM
Ask Jeeves Ads on the Radio WPW_Feedbot Search Engine Optimization Forum 0 09-20-2005 12:00 PM
Virgin Radio jawn_tech The Castle Breakroom (General: Any Topic) 14 09-06-2005 12:35 PM
Internet Radio Ad Buy? Gorgias Ad Space Buy and Sell 2 04-26-2005 01:17 PM


All times are GMT -4. The time now is 11:31 PM.



Search Engine Optimization by vBSEO 3.3.0