Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

- Home
- >
- Acrobat SDK
- >
- Need some help using Natural Logarithm/LN Calculat...

Dec 11, 2017

Copy link to clipboard

Copied

I have a couple text boxes as follows:

text1 = number that doesn't change (6.5459673)

text2 = number that will change based on input from another text box (box1F6)

in excel the calculation would be: 6.5459673 (or text1) * (LN(F6))

I tried doing this:

var nBox = + getField("box1F6").value;

event.value = math.log(nBox);

but that didn't even put a 0 or any input for that matter.

Any help is appreciated! Thanks in advance!

TOPICS

Acrobat SDK and JavaScript,
Windows

Community Guidelines

Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

Dec 11, 2017

Copy link to clipboard

Copied

I have a couple text boxes as follows:

text1 = number that doesn't change (6.5459673)

text2 = number that will change based on input from another text box (box1F6)

in excel the calculation would be: 6.5459673 (or text1) * (LN(F6))

I tried doing this:

var nBox = + getField("box1F6").value;

event.value = math.log(nBox);

but that didn't even put a 0 or any input for that matter.

Any help is appreciated! Thanks in advance!

TOPICS

Acrobat SDK and JavaScript,
Windows

Community Guidelines

Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

Hoey

Dec 11, 2017
0
/t5/acrobat-sdk/need-some-help-using-natural-logarithm-ln-calculation/td-p/9526343
2
Replies
2

Dec 11, 2017

Copy link to clipboard

Copied

Community Guidelines

Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

Reply

Loading...

try67

Dec 11, 2017
1
/t5/acrobat-sdk/need-some-help-using-natural-logarithm-ln-calculation/m-p/9526344#M26865
Thom Parker
LATEST

Dec 11, 2017

Copy link to clipboard

Copied

Was there an error reported in the console?

Is this code entered into the Calculation Script?

Do you know that the value of "box1F6" is a number?

And math needs to be capitalized: Math.log();

Try this. add this line to your code immediately after the "getField" line

console.pritnln("Val=" + nBox);

Here is a tutorial on using the Console Window.

The Acrobat JavaScript Console Window - YouTube

**Thom Parker**- Software Developer at PDFScripting.com- Use the Acrobat JavaScript Reference Early and Often

Community Guidelines

Reply

Loading...

Thom Parker

Dec 11, 2017
1
/t5/acrobat-sdk/need-some-help-using-natural-logarithm-ln-calculation/m-p/9526345#M26866
Using the Community
Experience League
Terms of Use
Privacy Policy
Cookie preferences
AdChoices
Language:

- Deutsch
- English
- Español
- Français
- 日本語コミュニティ
- Português

Copyright © 2020 Adobe. All rights reserved.