473,387 Members | 1,497 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

making an image part of the Radio button

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?

Nov 22 '07 #1
4 16380
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

Nov 22 '07 #2
On Thu, 22 Nov 2007 17:43:07 +0100, Summercool <Su************@gmail.com
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?
<input type="radio" id="my_input_id"><label for="my_input_id">sometext
and/or HTML</label>
--
Rik Wasmus
Nov 22 '07 #3
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
Nov 22 '07 #4
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.

Nov 23 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Rick | last post by:
After being frustrated with this issue on several occasions I think I found the secret sauce for solving the issue after reading a few different messages about what others thought and trying a...
3
by: ewitkop90 | last post by:
Here is my code: <SCRIPT> function transportchange(transport) { if (framenewinstall.Helpdesk.checked) framenewinstall.Helpdesk.checked=false; if (framenewinstall.CircuitNumber.checked)...
3
by: chuck | last post by:
Hi, This is a test for a larger form i am working on. I want to have a real time display of the radio button value when selected. I tried with various event handlers with varying success. The...
5
by: joshuaphillips | last post by:
Hi All, I am creating a Kiosk frontend that has tons and tons of radio buttons. (402 to be exact.) Anyhow, because this is a touch screen application, I have added an image to each radio button...
1
by: Karthick Kumar | last post by:
Hi, I have the following code which displays all the images from a specific folder with a Radio button in it: Dim objFile i = 1 For Each objFile In objFolder.Files If (i = 1) Then...
2
by: NishSF | last post by:
Would anyone have any suggestions/javascript code so that if one clicks the Radio Button "Yes" below he has the option of selecting any of the six CheckBox below. If the user clicks on Radio Button...
16
by: Stuart | last post by:
I have a page where I utilise the left and right cursor keys to change an image, also on this page is a groups of radio buttons, unfortunately when a radio button is clicked the focus for the...
10
by: IchBin | last post by:
I am trying to set the state of a radio button. I do not see what I am doing wrong. Sorry, I am new at this.. I need another set of eyes to look at this snip of code. I am trying to set the radio...
3
by: jahphill | last post by:
Hey. I thought id make a seperate discusion because the other became a bit lengthy and confusing. Aim: Create a php file which works with the script below, which makes the radiobuttons work =D...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.