Expand my Community achievements bar.

SOLVED

View specific page

Avatar

Level 7

How with a button on click event I will be able to view specific page or specific subform of a page?

Form consist from flowed pages

Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 5

If you have at least one field on the hidden page you can use the below script on click of the button.

1.          form1.Page2.presence = "visible";

               xfa.host.setFocus("Page2.TextField1");

2. If you know the page number

          form1.Page2.presence = "visible";

          event.target.pageNum = x (the hidden page number);

Im nt sure about the second approach whether it works or not but the first approach works fine.

Thanks

Vjay

View solution in original post

3 Replies

Avatar

Level 5

if it is a subform then subform.presence ="visible";

if it is a page then page.presence = "visible";

To hide the same subform.presence ="hidden";

Vjay

Avatar

Level 7

I will be more specific...

I have a form with 5 pages

Page 2 is hidden.

At the end of the form I have a button(Show Page 2).

This I like to achive is when a user clicks on the button to make the Page 2 visible

and to immintetlly view on screen Page 2 than the last page!

Form is with flowed pages and page 2 can be page 3 and so on...

Thanks

Avatar

Correct answer by
Level 5

If you have at least one field on the hidden page you can use the below script on click of the button.

1.          form1.Page2.presence = "visible";

               xfa.host.setFocus("Page2.TextField1");

2. If you know the page number

          form1.Page2.presence = "visible";

          event.target.pageNum = x (the hidden page number);

Im nt sure about the second approach whether it works or not but the first approach works fine.

Thanks

Vjay