I've got a few multi page forms, when I simply want the focus at the end of each page, to go to the first field on the next page in the form. Sometimes this happens and sometimes it doesn't and I can't figure out what is different in each case.
Otherwise it just keeps returning to the beginning of the first page.
I've tried doing an 'xfa.host.setFocus(pageno.fieldname)', but it doesn't always make a difference. I've also checked the tabbing order - and for each new page it restarts at 1. But what is weird is that in the case of some forms, that makes no difference and it works fine, yet in others it doesn't.
Does anyone have any clue what the problem is please and how I can fix it?
I decided to use a different approach that you might like. In the script below, the field name is RATitle. It is the only field I have in the form with that name. The .. means it will search for that field name. I put the script on a button that takes the user to that page, but you could use the same thing for focus.
var oRA = xfa.form.resolveNode("$..RATitle");
var nPage = xfa.layout.absPage(oRA);
xfa.host.currentPage = nPage;