DAX – one of a function of FullAjax, used for request a text data, xml, json, and similar (DataAjaX).

Example using DAX:

1
2
3
dax({url:'myurl', id:'save-data', form:'myform', method:'post', cb:function(resp, cbo){
	alert(resp.text || resp.xml)
}})

Data from all field (input, textarea, select, …) of the form with id=’myform’ will be automatically collected and sent to url=myurl use post method.

id – it a internal thread id designed to separate streams of several trips to the server. At the same time, there can be multiple requests with the same id, the following query overrides the previous. Also use id allows to reuse already created in memory objects.

List of DAX options:

  • url/src – requested URL.
  • id – internal thread id.
  • method – request method. post or get (default get).
  • form – form id, form, element id, or element from which to collect data.
  • params – parameters that should be added to the query (Example: params:’name=val1&dat=val2′).
  • callback/cb – callback function.
  • callbackOps/cbo – options transferred to the callback function.
  • destroy – remove the process from memory after request. true or false (default false).
  • anticache/nocache – cache disabled. true or false (default false).
  • async – use of asynchronous request. true or false (default true).
  • xml – XML, emulation response. In the presence of this parameter request to the server is not made.
  • text – text, emulation response. In the presence of this parameter request to the server is not made.
  • user – username, when a connection requires a username
  • pswd – password, when a connection requires a password
  • headers – array of HTTP headers of the objects {key: value} to be passed to the server. Example: headers:[{Etag: '123'}, {'Accept-Encoding': 'gzip,deflate'}]
  • loader – id load indicator.
  • storage – using local storage. Valid only when SRAX.Storage connected. true or false (default true).
  • etag – Etag use to identify the novelty in the local data repository. Valid only when SRAX.Storage connected. true or false (default true).

Sorry, the comment form is closed at this time.

Єдина Країна! Единая Страна! United Country