cancel
Showing results for 
Search instead for 
Did you mean: 

dynamically set y axis (position) with javascript

0 Kudos

Hello

I wonder if it is possible with javascript to set a y position of flowed subform in non interactive adobe form?

For example: For a certain subform which is inclued in (flowed) main I want to be shown at certain vertical (y) position but only in the last page at bottom of main.

Last page I can find with

if(xfa.layout.page(this) == xfa.layout.pageCount())

but when changing

this.y = "100 mm"

it doesn't changes subform position.

I also tried with this.y = "100in", but result is the same.

Does anybody now a solution?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Andrej,

I also have a similiar requirement.

Can you please share the solution for the issue.

Thanks and regards,

Raka.

0 Kudos

No, unfortunately I didn't find any appropriate solution for this. At the end I set it up as it this described in my last post above (with some empty space from first page to one before last, and only in the last page there is a positioned subform).

rakesh_m2
Contributor
0 Kudos

You cannot set the y position of any field in a flowed subform. You can do it in positioned subform.

As far as I understood, You need sub field value to be displayed in last page at some position. I think, this you can do by inserting that field in master page and using the script which you have used, make it visible only for last page.

Thanks,

Rakesh

0 Kudos

It's not a field, it's a complete subform with a table and some texts fields, which I want to show only in last page.

I tried changing subform to a positioned already before and changing it's y axis in javascript (tried in all events) doesn't work.

Could it be that syntax posted in first post isn't correct?

In that case (positioned subform) I have blank space on all pages but last one. For example, if a complete layout of a page is 100%, main 70% and subform 30%, I get 30% of blank space on all pages before last one, which I would like to avoid, so that main would be 100% in every page but last one and in the last one main should be only 70% and subform 30%.

rakesh_m2
Contributor
0 Kudos

Hello Andrej,

You can adjust dynamically the values of any object, either subform or field or text ..

but the main pre requsite, the subform in which it is bind should be positioned.....

Scripting syntax you have shown is correct, make sure that you enable javascript checking in adobe, so that it will show you syntax errors..

Rakesh