FAQ
Products Showcase Download Extras Support
 
Home :: Support :: Community :: CourseLab Issues

HTML Variables

HTML Variables 
Author:  Hanif    
Date: 09.07.2008 09:29:53
Dear my friends
I have a simple HTML code :

I open this HTML file via courselab. Then I want to read this variable via courselab javascript. How can I do it or How can I send this variable from HTML file to courselab?  
...
Re: (1) HTML Variables 
Author:  Slav Shchinov   [Courselab Team]
Date: 29.07.2008 21:03:45
Hi, Hanif,

If this HTML is in the same CourseLab document (i.e. the same DOM) then you can use JAVASCRIPT action with usual DOM addressing, i.e.

var myFieldValue = document.getElementById('myFieldID').value;
g_arSlideVars['my_CL_var'] = myFieldValue;

After that you will have CourseLab varible named "my_CL_var" with value from field.

But why use this plain HTML? There is text field object in CourseLab and it saves value in variable automatically.  
...
Re: (2) (1) HTML Variables 
Author:  Nick James   [Expert]
Date: 05.08.2008 16:55:08
This is in an external file you are having opened by Courselab inside the module?
I guess you want to have a way of changing variables that does not mean changing the module, just an external file or page.
To get this value isn't easy and as Slav says it would be much better to have the variable defined inside of Courselab.
 
...

Reply

You can also post this message as registered user. [Log in]
Author:
E-mail:
Subject:
Options:  Notify me if there is a new reply
Message emoticon:
Message body:
Insert smilie into text:
 
Jump to thread: