These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Form Keeps Locking Up

erhilse
Registered: Jun 30 2011
Posts: 3

I'm creating a pdf form and its a pretty simple form but whenever you select a dropdown or text field and put in info and click the next field it freezes unless you press esc a few times then it unlocks. I was wondering if anyone would know what would cause this?

My Product Information:
Acrobat Pro 9.4.3, Macintosh
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Do you have any calculations or scripts? It sounds like a circular calculation, or something like that.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

erhilse
Registered: Jun 30 2011
Posts: 3
Yeah I do have some calculations. I have some basic ones just for the sum then I have one for when you select a style it calculates the cost:

var nAstyle = new Array("select", "Crocs Classic");
var nAunitcost = new Array(0, 4.5);
var f = this.getField("Astyle")

for (var i = 0; nAstyle[i] != -1; i++) {
if (f.value == nAstyle[i]) {
event.value = nAunitcost[i];
break;

}
}

event.value *= 1;

After it calculates the cost it multiplies that by the quantity to get the final total
try67
Expert
Registered: Oct 30 2008
Posts: 2398
[EDITED]
Your for-loop is not well formed. You're comparing strings to a int value, which is not good practice. Try re-writing it.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

erhilse
Registered: Jun 30 2011
Posts: 3
I'm just beginning with Javascript... do you have any reference material I could look at to see the correct way of doing it?
try67
Expert
Registered: Oct 30 2008
Posts: 2398
This is a good JS tutorial, although it contains a lot of information which is specific for browsers and does not apply in Acrobat: http://w3schools.com/js/default.asp
Official JS reference: https://developer.mozilla.org/en/JavaScript/Reference

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com