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!

Style Item With Javascript.

Gus CJun 18 2014 — edited Jun 18 2014

Apex 3.2

Theme 15

IE 8

I have a few items on my page.

One item is Popup Key LOV

The rest are Text Field (Disabled, does not save state)

I am using javascript to set the background color depending on the value of another page item and this works

<script>

function setcolour()

{

  if ($x('P7_PROMO_STATUS').value == 'CREATE')

{

  $x('P7_PROMKEY').style.backgroundColor='#FFFF99'

  $x('P7_LONGDESCR').style.backgroundColor='#FFFF99'

  $x('P7_PROMOSTARTDATE').style.backgroundColor='#FFFF99'

  $x('P7_PROMOENDDATE').style.backgroundColor='#FFFF99'

 

}

    if ($x('P7_PROMO_STATUS').value == 'ACTIVE')

{

  $x('P7_PROMKEY').style.backgroundColor='#99FF99'

  $x('P7_LONGDESCR').style.backgroundColor='#99FF99'

  $x('P7_PROMOSTARTDATE').style.backgroundColor='#99FF99'

  $x('P7_PROMOENDDATE').style.backgroundColor='#99FF99'

 

}

    if ($x('P7_PROMO_STATUS').value == 'FINISHED')

{

  $x('P7_PROMKEY').style.backgroundColor='#FF7755'

  $x('P7_LONGDESCR').style.backgroundColor='#FF7755'

  $x('P7_PROMOSTARTDATE').style.backgroundColor='#FF7755'

  $x('P7_PROMOENDDATE').style.backgroundColor='#FF7755'

 

}

}

</script>

I would also like to change the text color to blue for these items.

I have tried

$x('P7_LONGDESCR').style.color='blue'

$x('P7_LONGDESCR').style.font-color='blue'

but they do not have any effect

Cheers

Gus

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 16 2014
Added on Jun 18 2014
8 comments
407 views