Ijax Documentation

Simulator

The easiest way to understand the Ijax requests and responses is to use the Ijax simulator page. It shows you all of the Ijax requests along with their parameters and lets you play around and see the results.

Please contact Iguana for access to this service.

The following documentation assumes that you have seen the service in action.

Authentication

Authentication for Ijax is straight forward since no personal data is involved.

Please see here for a discussion.

XML

The XML format is intended to be used by server side applications.

DTD

Please refer to http://iguana2.com/ijax/ijax.dtd

JSON

The JSON format is intended to be used by client side javascript applications.

IJAX Library

Iguana provides a javascript library to help access the Ijax server that you are free to make use of.

We will update the library with bugfixes as required so we suggest that you load it from our servers directly:

<script type="text/javascript" src="ijax/ijax_v1.js"></script>

Note that the filename incorporates a version number. If the API is altered, we will put out a new version so that your existing code is not affected.

You are free to take the code and change it to suit, or write your own access method from scratch, but we highly recommend using our library instead.

AJAX Method and Cross Domain scripting

The Ijax server can respond with JSON or JSONP data which allows you to choose to use XMLHttpRequest (or the Microsoft variants) or the Dynamic Script hack.

XMLHttpRequest does not allow your javascript to make a request to a domain different to the domain that served the document. Since your documents are not hosted on the Ijax server, you have to implement some sort of proxy to receive the Ijax requests from the user at your own server and then tunnel them to the Ijax server.

This somewhat defeats the purpose since you could just as easilly make an XML request from your server, so by default our Ijax library uses the dynamic script hack to get around the cross-domain problem.

To make use of the dynamic script hack, the Ijax server is asked to produce a javascript function call, not a javascript object. Then the result is loaded as a script, not as data, and the function you supplied is called with the data.

For example, if the JSON object is { foo: 123 }, the dynamic script hack might turn this in to my_callback({ foo: 123 }).

The Ijax library builds the script tag and adds it to the document dynamically.

Note

This situation should change in the future. If a new method that allows secure cross domain AJAX becomes standard, then Iguana will implement it in the server add it to the library.