This is an old revision of the document!
AJAX is the standard for Asynchronous Javascript and allows dynamic variables to be loaded into a page. In WattmonOS, the home page uses AJAX to update its parameters once per second.
Various packages may insert hooks that generate content in the AJAX output. All parameters in the AJAX page are JSON-encoded.
In order to send parameters to the home page, your script should output one or more lines of valid JSON data, with a key and value in the format:
"numeric_key":1, "string_key":"my string", "array_key":[1,5,6], "object_key":{"name":"Joe","age:21"}, "array_object_key":[ {"name":"Joe","age:21"}, {"name":"Jane","age:32"} ],
End each parameter with a comma (,).