GithubHelp home page GithubHelp logo

fmajax's Introduction

FMAjax

Updates in v1.2:

  • Use camelCase instead of snake_case for all method and options
  • Remove include_url_params option from callFmpURL
  • Clarify that "Automatically encode URL" should be unchecked in the web viewer to prevent OS differences
  • Remove internal _queue method

FMAjax is a javascript library and accompanying FileMaker module which includes functions to facilitate communication with a web viewer without reloading the page. It helps you call FileMaker scripts from a web viewer application and return data to the web viewer. The two important parts of accomplishing this are using the onhashchange javascript event to get data to the web viewer via the url and using jsonp to load files into the web viewer asynchronously. These solutions work across Mac, Windows, and iOS, hosted and local files. FileMaker 13.0v2 is required.

A chronology of events might help explain how it works

  1. On initialization, web code files are exported to the temporary directory.
  2. These files are then loaded into their corresponding web viewers.
  3. The fmajax.js javascript library is also exported and referenced in the pages loaded in the web viewers.
  4. The user interacts with the web viewer and does something that requires data to be retrieved from FileMaker.
  5. An fmp:// url is triggered in the web viewer which includes any needed variables and parameters.
  6. This url opens a FileMaker script which gathers the data or takes any needed actions.
  7. The data is sent to an fmajax FileMaker script.
  8. The script exports the data to a file or to the hash of the web viewer's source url.
  9. If the data was exported to a file, then the hash of the web viewer's source url is updated.
  10. If the data was exported to a file, the web viewer loads the files as a javascript file and processed the data.
  11. 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

  1. web_viewer_code - stores code for web files
  2. web_viewer_insances - stores data relating to each web viewer
  3. FMAjax - base table with globals and user preferences

See the FMAjax.fmp12 file for installation instructions

fmajax's People

Contributors

ryanlsimms avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.