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

debug issue

New Here ,
Jul 28, 2016 Jul 28, 2016

var g29 = this.getField("29G");
var g26 = this.getField("26G");
var g1  = this.getField("Gauge");

if (g29.value == 'Yes') && (g26.value == 'Yes')
|| (g29.value == 'Off') && (g26.value == 'Off'){
g1
.value='ERROR'
} else if (g29.value == 'Yes') && (g26.value == 'Off') {
g1
.value='29 GA'
} else if (g29.value == 'Off') && (g26.value == 'Yes') {
g1
.value='26 GA'
}

Any idea what I'm doing wrong? I'm gettng a syntax error at g1.value='ERROR'

TOPICS
Acrobat SDK and JavaScript , Windows
356
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 Expert ,
Jul 28, 2016 Jul 28, 2016

There must be a set of parentheses around the entire if-statement.

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
New Here ,
Jul 28, 2016 Jul 28, 2016
LATEST

Thank you, that worked like a charm.

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