Note: You are currently viewing documentation for Moodle 2.4. Up-to-date documentation for the latest stable version of Moodle may be available here: Dataform Javascript.

Dataform Javascript: Difference between revisions

From MoodleDocs
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Dataform}}
You can use javascript to manipulate the way entries are displayed and behave in any of the Dataform views. Any html element in the designated view, that has an id or a css class can be accessed and manipulated by javascript.
You can use javascript to manipulate the way entries are displayed and behave in any of the Dataform views. Any html element in the designated view, that has an id or a css class can be accessed and manipulated by javascript.


[[Image:df-js-tab.png|frame|The Dataform JS tab]]
The Dataform allows you to add javascript in three ways:
* '''Include external javascript''' - You can specify a list of urls to external javascript files and these files will be loaded to the Dataform view page.
* '''Javascript code''' - You can enter javascript code directly. This is usually required in addition to including javascript files so as to apply the desired effects to particular views or particular items in views.
* '''Upload javascript files''' - You can upload javascript files into the Dataform files area in Moodle's file system. These files become part of the Dataform instance to which they are uploaded and are included in Dataform presets and backups.


The Dataform allows you to add javascript in three ways.
[[Image:df-js-tab.png|frame|center|The Dataform JS tab]]

Latest revision as of 23:12, 1 October 2012

You can use javascript to manipulate the way entries are displayed and behave in any of the Dataform views. Any html element in the designated view, that has an id or a css class can be accessed and manipulated by javascript.

The Dataform allows you to add javascript in three ways:

  • Include external javascript - You can specify a list of urls to external javascript files and these files will be loaded to the Dataform view page.
  • Javascript code - You can enter javascript code directly. This is usually required in addition to including javascript files so as to apply the desired effects to particular views or particular items in views.
  • Upload javascript files - You can upload javascript files into the Dataform files area in Moodle's file system. These files become part of the Dataform instance to which they are uploaded and are included in Dataform presets and backups.
The Dataform JS tab