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.
server.html
file to somewhere on your domain.jSQLe.js
file in a <script>
tag in each page that requires jSQL. You must not inlude jSQL.js
as well.jSQLe.load()
and passing it an object with 2 properties:
server.html
file which is hosting the jSQL instance you need to access.jSQLe.load()
must be called before jSQL.load()
. Until jSQL has loaded, none of it's other methods will be available when using this plugin.jSQLe.load({
role: "client",
server: "http://mysite.com/path/to/server.html"
});
jSQL.load(function(){
// Do stuff with jSQL
});
These demo pages are available in the Github project as well.