Image for radio button?

Discussion in 'HTML & Website Design' started by tdnetworks, Nov 12, 2009.

  1. #1
    My brain appears to be sleep today. Is it possible to make a radio button a image? I want a user to click on the image that has a defined value for my form but don't know how to change it from my radio button to a image.

    Here is the code for the radio button that I have now...
    
    <input name="product_id" type="radio" id="product1" value="1"  />
    <input name="product_id" type="radio" id="product2" value="2"  />
    <input name="product_id" type="radio" id="product3" value="3"  />
    
    Code (markup):
    and here is how I have my button on my new form programmed...
    
    <a href="#" onclick="activateThisColumn('choiceA');return false;"><img src="i/choose.gif" alt="Choose" /></a>
    <a href="#" onclick="activateThisColumn('choiceB');return false;"><img src="i/choose.gif" alt="Choose" /></a>
    <a href="#" onclick="activateThisColumn('choiceC');return false;"><img src="i/choose.gif" alt="Choose" /></a>
    
    Code (markup):
    I need the id and value to pass on in the form but I want to keep my image on my new form. Any help?
     
    tdnetworks, Nov 12, 2009 IP