setFocus not working in older versions of Reader (pre version 8)
I have a form that was created in LiveCycle Designer 8.2 and has the following issue:
I have used the setFocus method to help the form filler (end user) navigate around the form. It works fine when the end user is viewing the form in Reader version 8 or higher, but it does not work in earlier versions. is there a work around to get similar functionality in earlier versions of Reader.
there is a drop-down list where the user is directed to different fields depending on their answer. it uses the following if expression in the "validate" event:
was changing the color of the font in the text box instead of the caption color, but when you replicated the form, the script worked correctly. I wonder if my "setFocus" problem is another glitch in the software (or at least my installation of the software).
I woud also use the absolute address to make sure you're pointing to the correct fields.
I did a couple of test with the setFocus command with these results:
Reader 7.0.5 - setFocus worked if I added somExpression after field:
Reader 6.0 - setFocus did not work at all even with somExpression and absolute addressing.
Reader 5.0 - Form would not even open. I kept getting the error message "The file is damaged and could not be repaired".
So I added the somExpression as shown and my setFocus works for Reader 7 and up.
I added an app.alert before the expression, but it just showed that the comparison was correct. I also added the absolute addresses in the expressions, but with the same results.
The somExpression added after the field did correct the problem for Reader 7.0.5, which will cover the majority of the end users, so I will go with that. I am not sure why it is needed, but I am glad it works.
Many thanks to all of you, for your time and assistance.
One more thing about the setFocus issue:
I tried my test form on Adobe Reader 6.0.2 and the setFocus worked OK when using the somExpression.
So adding the somExpression to the setFocus works with Reader 6.0.2 and up, but it did not work with Reader 6.0 or Reader 6.0.1.