UNPKG

intercooler

Version:

Making AJAX as easy as anchor tags

41 lines (27 loc) 1.35 kB
--- layout: default nav: attributes > ic-on-beforeSend --- <div class="container"> <div class="row"> <div class="col-md-12"> <h2><code>ic-on-error</code> - JQuery AJAX Request life cycle attribute</h2> <h3>Summary</h3> <p>This attribute is a javascript expression that will be evaluated after an erroneous AJAX request is completed on behalf of Intercooler. It corresponds to the <code>error</code> property in JQuery's <code>ajax()</code> method.</p> <h3>Syntax</h3> <p>This attribute is a valid javascript expression, evaluated within an isolated scope.</p> <p>This attribute may be placed on parent elements, allowing you to specify behavior across multiple elements.</p> <p>Available symbols are:</p> <ul> <li><code>status</code> - Possible values (besides null) are "timeout", "error", "abort", and "parsererror"</li> <li><code>str</code> - Textual portion of the HTTP status, such as "Not Found" or "Internal Server Error."</li> <li><code>xhr</code> - The XHR object</li> </ul> <p>The <code>ic-on-error</code> can be placed on an parent element, allowing general request processing for an entire page. Intercooler will find the closest element with this attribute and evaluate it.</p> </div> </div> </div>