Toolkit

Ajax

This object is included in the minified toolkit library and is required for all the Ajax methods used. It acts as a helper for all ajax requests.

Simple Ajax GET

{
    _: "button",
    innerHTML: "Test",
    onclick: function() {
        Ajax.do("ExampleData.txt", null, function(response) {
           alert(response); 
        });
    }
}

Reference

The following functions can be used:

Optional: post parameter, if null or undefined is passed the request will be executed as GET request.

Optional: callBackData, this information will be passed to the callback method as second parameter.

Optional: submitButton, If included, this value will also be passed, just like a normal form.

Optional: extraSettings parameter, it can be passed as an { } object and can contain these settings:

Note that defaults kan be overwritten by directly setting the parameter on the Ajax object (for example: Ajax.timeout = 60000; ).

The extraSettings can also be set on the TK. components which are using ajax using the property AjaxSettings.