Jump to content

Just a quick question I had...


clonetrooper9494

Recommended Posts

I have this one page where you click either the image, or a radio in order change some thing... but if you click the image, the radio doesn't get checked with the little dot!I know how I am going to fix this, except I don't know if there is a way to do that or if there is a way... I have:

<script>function setcolor00(value_2be_changed, radio_id_2be_checked){document.getElementById(...).value = value_2be_changed;radio_id_2be_checked = ???;//(EX: document.getElementById('radio1').??? = ???;)}</script>

What should those question marks be to make radio1 become checked?

Link to comment
Share on other sites

If what you want is to check the radio button_document.getElementById('radio1').checked = "checked"If you want a radio button to be checked when you click an image you can do this:<input type="radio" id="radio1" name="something" /><label for="radio1"><img /></label><input type="radio" id="radio2" name="something" /><label for="radio2"><img /></label>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...