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!

Show or Hide Region Depending On Radio Button

493904Aug 24 2010 — edited Oct 20 2010
I am trying to hide or show a region depending on the value of a radio button.
Radio button (P60_XX) has 2 possible values (1 and 2) and a default value of 2. My region has a static id of GD.

My onclick event works and the region displays or does not display, as it should, but I cannot get my onload to work, ie the region should not be displayed, as the default value is 2.

In my page header I have
<script type="text/javascript">
function GermDist(pThis) {
  if(pThis) {
     var lval= $v(pThis);
       if (lval == 2) {
              $x_Hide('GD');
                         } else if (lval == 1) {
              $x_Show('GD');
}}}
</script>

My onclick on P60_XX is

onclick="GermDist(this);" and works

My onload is

onLoad="GermDist('P60_XX');"  and does not work
Can anyone point out where I am going wrong please

Gus
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 17 2010
Added on Aug 24 2010
18 comments
2,083 views