jSQLEverywhere

jSQLEverywhere allows you to use a single jSQL instance anywhere by loading a simple HTML page which includes jSQL in an invisible iFrame and then pointing the global jSQL variable to the one in the iFrame.

Usage

  1. Edit the script tag in server.html file to somewhere on your domain.
  2. Include the jSQLe.js file in a <script> tag in each page that requires jSQL. You must not inlude jSQL.js as well.
  3. Initiate the plugin by calling jSQLe.load() and passing it an object with 2 properties:
    • role - Should always be "client". There will be other options in later versions.
    • server - The URL of the server.html file which is hosting the jSQL instance you need to access.

Example

jSQLe.load({
  role: "client",
  server: "http://mysite.com/path/to/server.html"
});

jSQL.load(function(){
  // Do stuff with jSQL
});

Demo

These demo pages are available in the Github project as well.

Demo Page 1 Demo Page 2 Demo Page 3