Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Set focus to object other than field

jnicholas330
Level 7
Level 7

I have a fairly large subform with a number of fields in it. In certain cases, I want to move the user's screen such that the top of the subform is showing. I've tried xfa.host.setFocus(), providing it with the subform object, but this does nothing. The documentation is not clear on whether this should work. Any ideas?

1 Accepted Solution
radzmar
Correct answer by
Level 10
Level 10
0 Replies
radzmar
Correct answer by
Level 10
Level 10
jnicholas330
Level 7
Level 7

Hi Radzmar,

This is very helpful. I didn't like the use of the FormCalc from JavaScript, so I cobbled some code together and now that dependency is removed. There also some changes to how the extents are calculated. Here is the revised form.