Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adobe form calculation

Status
Not open for further replies.

Ostgard

Technical User
Oct 10, 2005
3
SE
forgive me my lack of knowledge on this subject...

I´m dealing with a pdf-form, where I should create a calculation. This is my calculation so far.

var f = this.getField("mil");
var g = this.getField("kr/mil")
event.value = f.value * g.value

But whatever 'var g' is the result that should be presented should never exceed: 17 * var f
The maximum result returned 17 times var f.

 
I did like this, but it feels like something is missing? :)


var f = this.getField("mil1");
var g = this.getField("kr/mil1")
var g = Math.min( parseInt( this.getField("kr/mil") ), 17 );
event.value = f * g

Thanks for your answer, but i din´t really understand what your code does...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top