There is a GlobalJavascript node.Pascal wrote:But I still have the problem that I cant access the JavaScript function globally is there a way to archive this.
Hopefully the snippet below explains how it works.
If it doesn't let me have a few more details and I will see if I can work out how to do it.
Code: Select all
<Settings> <AutoSetPageWhenSeen>false</AutoSetPageWhenSeen> </Settings> <GlobalJavascript> <![CDATA[ function gsGetCapitalisedText(txtIn) { txtOut = "This is uppercase " + txtIn.toUpperCase(); return txtOut; } ]]> </GlobalJavascript> <Pages> <Page id="title"> <Text> <span>screpttext</span> </Text> <javascript> <![CDATA[ function pageLoad() { var fnctText = gsGetCapitalisedText("lowercase text"); scriptVars.put("screpttext", fnctText); } ]]> </javascript> </Page> 


