Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6762827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:24:18+00:00 2026-05-26T14:24:18+00:00

I have this code and cannot get it to select the radio when I

  • 0

I have this code and cannot get it to select the radio when I click on it’s image.

I’m I missing something?

Here is the current code:

<label style="display: inline; " for="test1">

<img src="images/image1.jpg" />

<input checked="checked" class="select_control" id="select1" name="test1" type="radio" value="value1" />
</label>

<label style="display: inline; " for="test2">

<img src="images/image2.jpg" />

<input checked="checked" class="select_control" id="select2" name="test2" type="radio" value="value2" />
</label>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T14:24:19+00:00Added an answer on May 26, 2026 at 2:24 pm

    The for attribute in label should match input’s id and not name. name is used for grouping radio buttons and checkboxes (when it’s the same name their are in a group, so checking one will will uncheck the other).

    <label for="test1">
      <img src="image1.jpg" />
      <input id="test1" name="test" type="radio" value="value1" />
    </label>
    <label for="test2">
        <img src="image2.jpg" />
        <input id="test2" name="test" type="radio" value="value2" />
    </label>
    

    Here’s a working example of your code: http://jsfiddle.net/nXb5a/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Whatever I do, I cannot get this code to echo $done . Here is
I have tried so many different soloutions but cannot get this to work Here
I wrote this code I have these errors Cannot implicitly convert type x.Program.TreeNode' to
Ignoring unsafe code, .NET cannot have memory leaks. I've read this endlessly from many
I have this code (ok, I don't, but something similar :p) var dogs =
I have this partial code: if ($getRecords = $con->prepare(SELECT * FROM AUCTIONS WHERE ARTICLE_NO
I have this code in PHP $max=SELECT MAX(num) FROM info; $maxquery= mysql_query($max) or die
I have my php code like this: $products = mysql_query(SELECT p.* FROM products AS
I have been staring at this code for hours now and I cannot figure
I have this code UPDATE OPENQUERY (db,'SELECT * FROM table WHERE ref = ''+

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.