Setting, Getting, and Displaying Values and Variables |
When including scripts in the generated web pages, a typical task is to get or set the values of the various fields, and the underlying data source items (either columns or variables): For variables only, once you have defined a variable set containing one or more variables, you can use these variables to store temporary values and to display or read them. Then, for all data source items (columns AND variables):
See: Scripting, and its related topics. There are four predefined JavaScript functions that you can use: setValue(<DataSource name>,<DataSource item>, <value>) setSearchValue(<DataSource name>,<DataSource item>, <value>) and getValue(<DataSource name>,<DataSource item>) getSearchValue(<DataSource name>,<DataSource item>) These functions are defined in the interface.js JavaScript file that you can find in the js subfolder of any publication folder. For an example, see: Scripting Example: The Period Case.
See: Events and Actions, and its related topics.
|