Passing lectora variables to Javascript function

sman2012
Community Member Posts: 5
Hi,
I have a Javascript function sitting in an external Lectora object (type: header scripting) that I call by modifying a Lectora variables to the function's name, i.e. On Mouse click set contents to value Javascipt:FunctionName().
The problem is that I have to send several strings as arguments to that function, two of which are dynamically generated in Lectora. When I call the function as, say, Javascript:FunctionName('string1', 'Var(lectora variable)') the variable value isn't sent - it just gets sent as a string, 'Var(lectora variable).
When I call it as Javascript:FunctionName('string1', Var(lectoravariable)) the function doesn't work.
Is it possible to pass lectora variables to a function in this manner, and if so, what am I doing wrong?
Thanks
I have a Javascript function sitting in an external Lectora object (type: header scripting) that I call by modifying a Lectora variables to the function's name, i.e. On Mouse click set contents to value Javascipt:FunctionName().
The problem is that I have to send several strings as arguments to that function, two of which are dynamically generated in Lectora. When I call the function as, say, Javascript:FunctionName('string1', 'Var(lectora variable)') the variable value isn't sent - it just gets sent as a string, 'Var(lectora variable).
When I call it as Javascript:FunctionName('string1', Var(lectoravariable)) the function doesn't work.
Is it possible to pass lectora variables to a function in this manner, and if so, what am I doing wrong?
Thanks
Categories
- 35.9K All Categories
- 109 ✫ Announcements
- 33.1K Lectora®
- 31.1K Lectora Discussions
- 29K Lectora Desktop
- 2K Lectora Online
- 2K Lectora Feature Requests
- 71 Lectora User Groups
- 36 Lectora Accessibility User Group (LAUG)
- 25 ELB Learning Content
- 25 ELB Learning Content Discussions
- 329 CenarioVR®
- 196 CenarioVR Discussions
- 133 CenarioVR Feature Requests
- 42 Rockstar Learning Platform®
- 39 Rockstar Learning Platform Discussions
- 108 CourseMill®
- 108 CourseMill Discussions
- 47 ReviewLink®
- 47 ReviewLink Discussions
- 7 The Training Arcade®
- 7 The Training Arcade Discussions
- 936 All Things eLearning
- 37 eLearning Development
- 546 Learning Management System (LMS) Integration
- 333 Web Accessibility
- 1.2K ♪ The Green Room
- 9 Additional Learning Products