Js function with if

Community Beginner ,
May 05, 2022 May 05, 2022

Copy link to clipboard

Copied

var h1 = this.getField("PROFESSIONE-1").value;
var h2 = this.getField("PROFESSIONE-2").value;
var h3 = this.getField("PROFESSIONE-3").value;
var h4 = this.getField("PROFESSIONE-4").value;
if(h1=="NON OCCUPATO"&&h1==" "){var i1=0;}else{var i1=1;}
if(h2=="NON OCCUPATO"&&h2==" "){var i2=0;}else{var i2=1;}
if(h3=="NON OCCUPATO"&&h3==" "){var i3=0;}else{var i3=1;}
if(h4=="NON OCCUPATO"&&h4==" "){var i4=0;}else{var i4=1;}
event.value=i1+i2+i3+i4;

TOPICS
JavaScript

Views

23

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
May 05, 2022 May 05, 2022

Copy link to clipboard

Copied

LATEST

Duplicate post.

Likes

Translate

Translate

Report

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