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 <p> 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?

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)

Problem has been solved!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.