radio buttons

Discussion in 'HTML' started by w.bristow, Sep 19, 2005.

  1. w.bristow

    w.bristow Guest

    I am hoping that someone can clear this little problem up. I have a web
    page written in html, which has radio buttons on it with images next to
    them. The page itself works fine and the form sends the correct
    information through to next page, what I want to be ablt to do is
    instead of just being able to click over the radio button to check it,
    I want to be able to click on the image aswell to check the radio
    button. Radio button and image are within table in different cells (not
    sure if that has any significance with any scripting you give me).

    Hope someone out there has come across this before, or knows how to do
    it.
     
    w.bristow, Sep 19, 2005
    #1
    1. Advertisements

  2. w.bristow

    Jim Higson Guest

    Put the images inside label tags
    http://www.google.co.uk/search?q=html+label&ie=UTF-8&oe=UTF-8
     
    Jim Higson, Sep 19, 2005
    #2
    1. Advertisements

  3. Put images inside a LABEL element for RADIO. Labels are attached by ID,
    I would still use text in label as well

    <input type="radio" name="myChoice" id="choiceY" value="yes">
    <label for="choiceY"><img src="yes.jpg" alt="Yes"></label>

    <input type="radio" name="myChoice" id="choiceN" value="no">
    <label for="choiceN"><img src="no.jpg" alt="No"></label>
     
    Jonathan N. Little, Sep 19, 2005
    #3
  4. w.bristow

    w.bristow Guest

    This give the radio button focus but doesn't fill it, any ideas why not
     
    w.bristow, Sep 20, 2005
    #4
  5. url?
     
    Jonathan N. Little, Sep 20, 2005
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.