Provides basic asynchronous xml call (AJAX) routines.
THIS IS THE NEW VERSION OF API. YOU CAN STIL USE THE OLD ONE (ajax.js), BUT IT IS OBSOLETE AND UNSUPPORTED. YOU SHOULD SWITCH TO THIS INTERFACE ASAP.Sends an HTTP request to a page url. Data to be contained in request are specified in data. When response arrives, callback(response) will be executed. You may specify the following options:
To prevent JavaScript hijacking attacks, web application authors are encouraged to use some of the countermeasures described in 'security' part of the documentation.
var options = { user:"username", password:"top_secret", auth:OAT.AJAX.AUTH_BASIC, onerror:function(request) { alert(request.getStatus()); } } var callback = function(data) { alert(data); }; OAT.AJAX.GET("/myfile.xml", false, callback, options);
Cancels all pending requests.
Here you can give a function to be executed when a request is being sent.
Here you can give a function to be executed when all requests were satisfied (or cancelled).