Set value of a radio group item
714576Oct 24 2009 — edited Oct 24 2009Hi,
I am trying to resolve following situation:
I have 2 radio groups P23_RG1 and P23_RG2 both having values Yes or No. What I want is that when a user selects/clicks 'No' in P23_RG1 then P23_RG2 should dynamically change to 'No' without page being refreshed.
Taking cue from various posts in this forum I tried using JS but it is not working at all. This is what I have done:
1. Created a JS function and added it into header of page 23
<script language="JavaScript1.1" type="text/javascript">
function set_P23_RG2_VALUE(pThis,pTarget){
if ($v(pThis) == 'N'){
$x(pTarget).value = 'N';
}
}
</script>
2. Included following command in "HTML Form Element Attributes" field on item P23_RG1
onclick="set_P23_RG2_VALUE(this,'P23_RG2');"
Please let me know if there is something I have put wrong or missing which is causing it not to work.
Thanks
-Nitin
APEX 3.2
DB Oracle 10g XE
Local Instance