As a follow up to the excellent javascript ‘Count Down’ example, I wanted to show you how to extend this functionality such that the ‘Count down’ is fully automated and doesn’t require either:
- Specific references to the the variable name, and
- Specific reference to the maximum number of characters declared in the variable
Assuming you have the Lesson 7 example working, these are the general next steps required:
- Move the mrData tags and HTML code specific to the ‘Count down’ functionality into a Question sub-template, along with additional mrData tags for automation
- Move the core javascript code into an external file (.js) and reference that external file from the new Question sub-template
- Modify the metadata file so that the variable in question references the new Question sub-template
Let’s take a look at each step in turn
Read more
Like this:
Like Loading...