ODK Tables Web Pages¶
Tables does not impose any structure to the HTML files a user may write. While the odkDataIf and odkCommonIf interfaces will always be injected into the WebKit, it is up to the user whether or not they make use of them (which generally means loading the odkData and odkCommon wrapper objects). A typical HTML file might be as follows:
DOCTYPE header defines the file compliance level (in this case, HTML 4.01 Transitional).
Once all the scripts and resources on the page have loaded, the script tag at the bottom of the
<body> section will invoke the display() function which was presumably specified in the user's
If the web page can launch other web pages or external applications, and if it cares about the status of those requests or needs to process the extras in the result intents returned from those requests (e.g., to interpret a barcode), then the user's
display() function, after it has initialized the page, should register a listener for action outcomes and call that listener once, directly, to process any outcome received prior to that registration (it will commonly be the case that these will have been received prior to the registration of this listener).
See the comments at the top of the
odkCommon.js file for details.