When you are working with complex UIs, this is sometimes useful to distinguish stateless responses from others. For example, if an input is just auto-saved, there is nothing to output anywhere so the response might be empty; but if an input needs to update the form, the new form might be contained in the response, and should replace the old one.

Event Description Test 1 Test 2
data-output

By default, data-output works like data-output-success.

(original content)
(original content)
data-output-success

Will put ajax response into the given selector, only if the ajax call succeeded.

(original content)
(original content)
data-output-failure

Will put ajax error into the given selector if the ajax call failed.

(original content)
(original content)
data-output-empty

Will put ajax response into the given selector, only if the ajax response was empty.

(original content)
(original content)
data-output-not-empty

Will put ajax response into the given selector, only if the ajax response was not empty.

(original content)
(original content)
Back to domajax's home