Are Javascript functions in Lectora global?
April 24, 2016 12:00 AM
In other words, can I declare a javascript function in the first page of my title and then call it from a different page?
Thanks for any thoughts
Andrew
Discussion (2)
G'day Andrew,
JavaScript functions are global for the given page that is loaded. If you declare the function at the page level then it will only be available for that give page, if declared at the chapter level then every page that shares that chapter will have access to the function and the best place if it's going to be a common function is to put it at the title level from where it will be available on every page.
HTH
Regards, Peter
www.LectoraDevelper.com
Discussions have been disabled for this post