Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Field Background won't change back

Community Beginner ,
Nov 22, 2016 Nov 22, 2016

I made a script to change the background to RED is the value was less than 4 AND greater than 0.

The changing to RED works great.  Problem is when it changes to anything above 4 it stays RED and wont' go back to Orange.

var G5= this.getField("G5").value;

var C7= this.getField("C7").value;

var C8= this.getField("C8").value;

if((C8*G5)==0)

{

event.value=(C7);

}else{

event.value=(((G5/C8)/5280)*3600);

}

(function (){

if (event.value<4 && event.value>0)event.target.fillColor=color.red;

else

event.target.fillColor=color.orange;

})();

TOPICS
Acrobat SDK and JavaScript , Windows
395
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Nov 22, 2016 Nov 22, 2016

There's no such thing as "color.orange". You need to use a RGB or CMYK

color array.

On Tue, Nov 22, 2016 at 10:13 PM, davidm76220796 <forums_noreply@adobe.com>

Translate
Community Expert ,
Nov 22, 2016 Nov 22, 2016

There's no such thing as "color.orange". You need to use a RGB or CMYK

color array.

On Tue, Nov 22, 2016 at 10:13 PM, davidm76220796 <forums_noreply@adobe.com>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 22, 2016 Nov 22, 2016
LATEST

Well, THAT would explain a few things 

Thanks, for the help.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines