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

Looping on Validation Fields

pat_c08
Registered: Sep 17 2007
Posts: 15

I have 8 fields where the rawvalue must be ge another field; if not, then setfocus back to that field. This works except when I tab to the next field without putting in the correct figure then it goes into a looping cycle and I have to break the program in order to get out...
 
if (numShower.rawValue < showercapa.rawValue) { xfa.host.messageBox("Invalid Number Input","Warning","1");
 
xfa.host.setFocus(this);
}
 
I have tried several solutions but nothing is working!
 
What causes this behavior. Please help!

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
You have not provided enough information for an exact answer, but the looping is probably caused by the events used. Obviously, the problem is caused by an invalid assumption about how things work.

The best way to design somthing like this is to draw out the sequence as a state machine diagram. Then test your assumptions about how it is going to work by placing "console.println()" statments in all of the events being used.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script