942,956 Members | Top Members by Rank

Ad:
Aug 14th, 2010
0

Get acces to a Radio Button

Expand Post »
Hi,

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

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. document.form_name.radio_name[number].checked = true;

So I'm doing that:

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. 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?
Last edited by Kligham; Aug 14th, 2010 at 10:23 pm.
Reputation Points: 10
Solved Threads: 0
Light Poster
Kligham is offline Offline
36 posts
since Jun 2009
Aug 15th, 2010
0
Re: Get acces to a Radio Button
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)
Reputation Points: 10
Solved Threads: 10
Junior Poster
gunnarflax is offline Offline
164 posts
since Jan 2010
Aug 15th, 2010
0
Re: Get acces to a Radio Button
Problem has been solved!
Reputation Points: 10
Solved Threads: 0
Light Poster
Kligham is offline Offline
36 posts
since Jun 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: div not working on success
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: event works in IE but not in firefox





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC