Explore the community Forums Social Lounge Variable Attributes in Lectora with Javascript

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #405016 Score: 0
    Profile photo of Emmanuel Cuevas
    Emmanuel Cuevas
    Member
    beginner
    intermediate
    wise owl
    friend finder
    picture perfect
    curious george
    @ecuevas1195

    Hi all!…

    I’ve worked on Lectora for the last few days and gathering info about how javascript works with Lectora. Due there isn’t a developer site I wondering what is the structure of a variable definition. I found a js script and I want to know how the variable attributes defines the following example.

     

    var VarBookmarkTitle = new Variable( ‘VarBookmarkTitle’, ‘0’, 0, 0, null, null, ‘page1.html’, f );

     

    Thanks in advance for all your comments.

    #405975 Score: 0
    Profile photo of Joe Wieloch
    Joe Wieloch
    Moderator
    beginner
    intermediate
    friend finder
    contributor
    LUC16 Attendee
    verified member
    wise owl
    LUC17 Attendee
    advanced
    picture perfect
    38 pts
    @wheels

    You can find that “class” defined in trivantis-cookie.js

    function Variable(name,defval,f,cm,frame,days,title)
    name - the variable name
    defval - default value
    f -  flag for time (0 - not time related, >0 - time related)
    cm - CourseMill variable (set to zero if not CourseMill related)
    frame - indicates course type (null, 'scorm', 'scorm2004', 'tincan')
    days - how many days the value is valid for or null
    title - the name of the title
    
    varName.getValue() to get the current value
    varName.set('something') to set the value
    
    
    
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.