Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Setting a Radio Button value using Javascript

Chris10263447Nov 19 2008 — edited Nov 21 2008
After much research, I've figured out that the appropriate command to get the value of a Radio Button in APEX JavaScript is "html_RadioValue", but I haven't been able to figure out a command that will let you set the value of the Radio Button. Is there documentation on APEX's use of JavaScript that covers this issue?

Here's a simplified version of the script:


<script language="JavaScript" type="text/javascript">
function showval()
{
var item1 = html_RadioValue('P19_RADIO');
alert(item1);

//Reverse the current selection
if (item1 == 'Y') then
{
<mystery_statement> //set P19_RADIO to N.
}
else
{
<mystery_statement> //set P19_RADIO to Y.
}
}
</script>


I've tried the following, but none of them have worked:

- document.getElementById("P19_RADIO").value = 'N';
- document.getElementById("P19_RADIO").checked = 'N';
- $x('P19_RADIO').value = 'N';
- $x('P19_RADIO').checked = 'N';


Thanks.
This post has been answered by 438381 on Nov 20 2008
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 19 2008
Added on Nov 19 2008
8 comments
1,422 views