| View previous topic :: View next topic |
| Author |
Message |
Roombor
Joined: 02 Jun 2006 Posts: 111
|
I have a tablecell and i would like to select the radio button within that cell when the user clicks on the cell
How do i change the value of a radio button? |
| |
|
|
|
|
optomeb
Joined: 19 May 2006 Posts: 113
|
| Radioref.value ? |
| |
|
|
Roombor
Joined: 02 Jun 2006 Posts: 111
|
| Well, i tried doing document.form.radio.value but the problem is that "radio" is a variable that contains the name of the radio button to be changed |
| |
|
|
optomeb
Joined: 19 May 2006 Posts: 113
|
| Roombor, document.forms[formname].elements[radioname].value |
| |
|
|
Roombor
Joined: 02 Jun 2006 Posts: 111
|
Oh, let me try that
no luck |
| |
|
|
optomeb
Joined: 19 May 2006 Posts: 113
|
`secret
What's supposed to happen? |
| |
|
|
Roombor
Joined: 02 Jun 2006 Posts: 111
|
| click on a table cell containing the radio button, the radio button selects |
| |
|
|
optomeb
Joined: 19 May 2006 Posts: 113
|
| Roombor, oh, radioref.selected = true; |
| |
|
|
Roombor
Joined: 02 Jun 2006 Posts: 111
|
Hm... let me try something
Didn't work
This shouldn't be this hard
it's working, had to do checked instead of selected |
| |
|
|
optomeb
Joined: 19 May 2006 Posts: 113
|
| Roombor, ah, I always get that mixed up |
| |
|
|
|