Quantcast
Channel: Adobe Community : Discussion List - Commenting & Collaboration
Viewing all articles
Browse latest Browse all 3276

Acrobat 9 Javascript Pulldown Menu if then

$
0
0

Im building a spreadsheet for a gaming character sheet and Im having trouble implementing a javascript to do an "if-then command.

I have a pulldown list and I need a text field box to refer to which selection was made and then implement one math problem (adding up separate fields) or another.

 

For example under Race Pulldown there is Human or Halfling. If they pick Human then text field box needs to show the total calculation result of text field A+B. If it shows Halfling then it needs to show the result of text field A+C.

 

I tried using:

if (this.getField("Race Pulldown").value == "Halfling"){  

event.target.display = display.visible;

}

else{

event.target.display = display.hidden;

}

 

and replacing event.targeting.display with the math calculation but I couldnt get it to work

Thanks

Chad


Viewing all articles
Browse latest Browse all 3276

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>