A chronology of events might help explain how it works
- On initialization, web code files are exported to the temporary directory.
- These files are then loaded into their corresponding web viewers.
- The user interacts with the web viewer and does something that requires data to be retrieved from FileMaker.
- An fmp:// url is triggered in the web viewer which includes any needed variables and parameters.
- This url opens a FileMaker script which gathers the data or takes any needed actions.
- The data is sent to an fmajax FileMaker script.
- The script exports the data to a file or to the hash of the web viewer's source url.
- If the data was exported to a file, then the hash of the web viewer's source url is updated.
- If the data was sent to the hash, then it is processed directly by the web viewer.
Data can also be pushed from FileMaker to a web viewer by starting on step 7
There are three tables for the FMAjax module
- web_viewer_code - stores code for web files
- web_viewer_insances - stores data relating to each web viewer
- FMAjax - base table with globals and user preferences
See the FMAjax.fmp12 file for installation instructions