Expand my Community achievements bar.

Set Focus to Top of Document

Avatar

Former Community Member
Help - I've created a dynamic form in designer 8.0. There are over 30 body pages. There is a contents page with "hyperlinks" using xfa.host.currentPage + (X) which navigate to each body page. This works fine. However I would like to have a "Return to Contents" button on the Master Page that will take me back to the Contents page.

Again using setFocus on the click event I've tried:



xfa.host.setFocus("xfa.form1.Contents.TextField16");



I'm assuming that this must be wrong, or is there any reason why I can't have the button on the Master Page?



Any help welcome.
2 Replies

Avatar

Former Community Member
Fixed it. Deleted xfa from the address and it finally worked:



xfa.host.setFocus("form1.Contents.TextField16");

Avatar

Level 5
Thanks for posting the solution to a question you answered yourself.

It adds value for others.



Mark