[Xerte] Using getPageIndex() to fill an array
Fred Riley
Fred.Riley at nottingham.ac.uk
Thu Jun 25 13:14:16 BST 2009
> Instead of using rootIcon.getPageIndex(), you need to use
> iconID.getPageIndex(), where iconID is the id of the
> framework you are interested in. If you are in the top level
> page, but then drop into a nested framework, then
> rootIcon.getPageIndex() will always return the same number (
> as you haven't changed page on the interface icon, i.e.
> rootIcon ) as you navigate through the nested framework.
>
> Does that help?
Yes, thanks Julian. The framework ID is 'fw' so using:
pagenum = fw.getPageIndex();
returns a different value for each page, so I can use code such as:
texts[pagenum] = icon.parentNode.clip().text;
to store user text from different pages in an array. There are four
frameworks in the application, all with the id "fw". Is this likely to
lead to conflict if I refer to fw in code in pages in each of these
frameworks, or are they all self-contained? Clear as mud that, I think.
I'll play around and see what happens. I can't rename the IDs as they're
referenced in other code buried away in interactions.
Cheers
Fred
More information about the Xerte
mailing list