How do you access the value of a form field using rjs/ajax?

Seems like a simple question, but I've had a heck of a time finding the
answer. The form object I need to access is a radio_button. We'll say
the id is someId.

I need the equivalent of:

var value = document.getElementById('someId').value;
if value == 'T' then blah blah

I'd go over all the different things I've tried and suggestions I've
received (none of which worked), but they're far too many.

What one would think is the obvious answer does not work:

value = page['someId'].value
if value == 'T'

Any help much appreciated