I´m having trouble understanding how to subtract a sum from a combobox by using checkbox with a given value.
There are two posts in the combox ("105" and "210"). There are three checkboxes representing a value of "42", "74" and "147". When checked (either one, two or three) that value should be deducted from the value in the combobox.
Any help in this would be much appreciated.
This script is probably horribly wrong, but it is what I have laborating with:
var A = Number(this.getField("komb7").value);
var B = (this.getField("kry1").value);
var C = (this.getField("kry2").value);
var D = (this.getField("kry3").value);
if(this.getField("kry1").isBoxChecked(0))
event.value - = 42;
if(this.getField("kry2").isBoxChecked(0))
event.value - = 74;
if(this.getField("kry3").isBoxChecked(0))
event.value - = 74;
event.value = A-B-C-D;
This entire part
is useless if afterwards you set event.value to
event.value = A-B-C-D;
See what I mean?
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com