Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > making an image part of the Radio button

Reply
Thread Tools

making an image part of the Radio button

 
 
Summercool
Guest
Posts: n/a
 
      11-22-2007
It seems like there are cases in which when you click on an image next
to the radio button, the radio button is selected...

must it be done by Javascript? can't it be done alone by HTML itself?

 
Reply With Quote
 
 
 
 
Scott Bryce
Guest
Posts: n/a
 
      11-22-2007
Summercool wrote:
> It seems like there are cases in which when you click on an image next
> to the radio button, the radio button is selected...
>
> must it be done by Javascript? can't it be done alone by HTML itself?



http://www.w3.org/TR/html401/interac...tml#edef-LABEL

 
Reply With Quote
 
 
 
 
Jonathan N. Little
Guest
Posts: n/a
 
      11-22-2007
Scott Bryce wrote:
> Summercool wrote:
>> It seems like there are cases in which when you click on an image next
>> to the radio button, the radio button is selected...
>>
>> must it be done by Javascript? can't it be done alone by HTML itself?

>
>
> http://www.w3.org/TR/html401/interac...tml#edef-LABEL
>


Illustrative example:

<fieldset>
<legend>Your Judgment:</legend>

<input type="radio" name="fate" id="fatelife" value="life">
<label for="fatelife">
<img src="thumbsup.gif" alt="thumbs up">
</label>

<input type="radio" name="fate" id="fatedeath" value="death">
<label for="fatedeath">
<img src="thumbsdown.gif" alt="thumbs down">
</label>

</fieldset>

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
Summercool
Guest
Posts: n/a
 
      11-23-2007
for CSS, is it possible to say, if the content in the div or span is
0, show the "0" in red, and if it is a "1", show it in green? I can
use PHP or any script to do it, but it probably is quite handy to let
CSS handle the formatting style without needing server support.

 
Reply With Quote
 
 
 
Reply

Thread Tools

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
making part of a background image clickable laredotornado@zipmail.com Javascript 2 05-09-2007 07:46 PM
Issue making textbox visible based on specific input from a radio button list in an EditItemTemplate Dan ASP .Net 0 11-30-2006 11:03 PM
ASP.NET Reset Radio Button in a group of Radio Buttons Scott D Johnson ASP .Net 1 09-27-2006 10:38 PM
Making check boxes active on selection of radio button... Mark HTML 24 01-07-2006 01:38 AM
Radio button List problem: How to find value of Radio button list's Selected Item using javascript?? Hiten ASP .Net Web Controls 1 05-26-2004 10:32 AM



Advertisments