new core/Ajax(url)
Ajax component class.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | Url address. |
- Source:
Extends
- ui/EventHandler
Methods
bind(ajaxGroup) → {Object}
Binds to an AjaxGroup to work with other Ajaxs.
Parameters:
Name | Type | Description |
---|---|---|
ajaxGroup |
core/AjaxGroup | Ajax group to bind. |
- Source:
Returns:
Instance reference.
- Type
- Object
send(objectopt) → {Object}
Sends ajax request.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
object |
Object |
<optional> |
Request data. |
- Source:
Fires:
- core/Ajax.event:core/Ajax:maxConnection
- core/AjaxGroup.event:core/AjaxGroup:maxConnection
- core/AjaxGroup.event:core/AjaxGroup:openedConnection
- core/Ajax.event:core/Ajax:send
Returns:
Instance reference.
- Type
- Object
setMethod(method) → {Object}
Sets request method.
Parameters:
Name | Type | Description |
---|---|---|
method |
string | Method name. |
- Source:
Returns:
Instance reference.
- Type
- Object
setUrl(method) → {Object}
Sets url address.
Parameters:
Name | Type | Description |
---|---|---|
method |
string | Url address. |
- Source:
Returns:
Instance reference.
- Type
- Object
Events
core/Ajax:always
On respond is got event.
Parameters:
Name | Type | Description |
---|---|---|
Responded |
string | non-parsed text. |
- Source:
core/Ajax:fail
On respond is fail event.
Parameters:
Name | Type | Description |
---|---|---|
Responded |
string | non-parsed text. |
- Source:
core/Ajax:maxConnection
On reached maximum connection event.
- Source:
core/Ajax:send
On send event.
- Source:
core/Ajax:success
On respond is successful event.
Parameters:
Name | Type | Description |
---|---|---|
Responded |
Object | json object |
- Source: