Skip navigation
Home/Support/

Forums

250 Views 5 Replies Latest reply: Jul 6, 2010 2:26 PM by Niall O\'Donovan RSS
Jono Moore Participant 635 posts since
Jan 31, 2008
Currently Being Moderated

Jul 5, 2010 4:31 PM

Need some more scripting help

 

[I'll be posting this over on the Google Group forum too.]

 

File is here: https://acrobat.com/#d=m7zuQYiUoFrtz5isD7rErQ

 

Form is a series of tables that can expand and contract their respective rows by clicking a button in the header - tables start out collapsed and filler can open the appropriate tables. I'm using + and - values on the buttons to check what they should do - they call a script object which handles looping through the table rows, etc (thanks Niall!).

 

I also have similar loops set up on prePrint and docReady (on the form1 root) events so that the tables collapse down to only used rows for printing or after the form is saved and re-opened.

 

I'm having a few issues that I'm having trouble figuring out. I'm thinking some of the problems might even have to do with which events I'm using but not sure.

 

Resetting the value of the +/- button in the header rows:

Unless a table is expanded and has rows that are empty showing I want the button caption to be a +. I've been trying to explicitly set this as part of the different loops but seem to be having issues.

 

Problem with repeating header button caption:

If a table breaks across a page, the button in the repeated header row doesn't reflect the caption of the button in the parent header row. I kind-of fixed this with some code from Paul Guerett which sets the caption based on xfa.layout.pageSpan and it works but if you click the repeated button again to collapse the table the main button caption doesn't update (should change back to a +), unless you click on the main button.

 

Related to this one is when the file is saved and re-opened table headers that had been repeated show random multiple time (2-5 generally).

 

I also ran into some trouble with Reader when using Unicode characters for the button caption. Instead of +/- I was trying to use \u25BC and \u25B2 (down and up triangles) but Reader seemed to choke on it.

 

This form is ready to go except for these couple of issues that I can't seem to track down.

 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points