954,176 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Get acces to a Radio Button

Hi,

I'm having trouble getting access to a Radio button. I found on the internet that I can use:

document.form_name.radio_name[number].checked = true;


So I'm doing that:

document.hitForm.Answer_1[0].checked = true;


But it isn't working. I have included a picture of the Chrome Dom inspector. Pic

The first circle points to the form the radio button is in.
The second and fourth circle are the same where tho radiobuttons are in with the same name. The third circle is an example of the radio button I need access to and I want to put it checked.

Can anyone help me out on this?

Kligham
Light Poster
36 posts since Jun 2009
Reputation Points: 10
Solved Threads: 0
 

I would just have used the jQuery selector to select the radiobutton with the corresponding name :) but I'm a jQuery freak as well so don't listen to me x)

gunnarflax
Junior Poster
164 posts since Jan 2010
Reputation Points: 10
Solved Threads: 10
 

Problem has been solved!

Kligham
Light Poster
36 posts since Jun 2009
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You