Hi - I am developing a PDF, and have been able to get by with "simplified field notations" performed for me up to this. Unfrotuantely, now I am stuck and I do not know where to turn for help. The Javscript world is forign to me. Thus, I apologize upfront for my ignorance.
This is what I am trying to accomplish. I wish to have field "Text34" equal a rank number 0, 1, 2, or 3 based upon the data (number) entered into field "Text15"
in other words, if "Text15" were greater than or equal to 3.75 then "Text34" would equal 3. Or, if "Text15" is less than or equal to 3.25 then "Text34" would equal 0.
I hope this makes sense? I would greatly appreciate any help anyone might be willing and able to offer.
Thanks, Rudy
http://www.acrobatusers.com/tutorials/2006/form_calculations
http://www.pdfscripting.com/public/department45.cfm
For your script you'll need to use an "if" statement.
For example:
var val1 = this.getField("Text15").value
if(val1 >= 3.75)
event.value = 3;
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]
Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script