[Xerte] use of isFunc and passing of parameters

johnathan.kemp at ntlworld.com johnathan.kemp at ntlworld.com
Fri Apr 16 19:44:52 BST 2010


I am developing a couple of page wizards, both of which provide the capability to define exit points from the page.

The first is a text page that allows you to define hyperlinks to other pages in the project. This is supported by a script where isFunc = 1.

I am calling it with

<a href="asfunction:_level0.engine.navToPage,rtFinal" target="_blank">Routed Tab</a>.

The destination page name, in this case rtFinal, is received as args[0] in the script navToPage. It appears only possible to pass one parameter.

I have a second wizard based on the hotspot in which any hotspot can have a destination page assigned to it. I have a similar function script in this wizard which is called by the script that runs when the hotspot is clicked on.

This script calls the function by navToPage(parameter1,parameter2,parameter3)
The results are received by the script in args[0],args[1],args[2]

All has worked well when the pages work in isolation, but once the text page has been run this then appears to define the args array at a level that dominates over the hotspot page. The only way I can get this to work is if I set args[0] before I call the function and then pass args[0] as a parameter, otherwise it picks up the value of args[0] set by the text page.

Can anyone shed any light on what is going on here?
Do I need to declare a new array args at the start of every page?
How would you operate two functions in a page if every function is going to handle its parameters as the same array args[]?

Kind regards

Johnathan


More information about the Xerte mailing list