The Lazr error helper allows generic error handling for site-wide issues
such as ajax-related errors, via the
lazr.error.display_error()
method.
Enter your error here:
A second error should appear in the error widget after 3 seconds.
The following Javascript and CSS files have been included for the example on this page (Note: error overlay currently extends overlay - we should invert this):
<script type="text/javascript" src="../../build/yui/yui-min.js"></script> <script type="text/javascript" src="../../build/lazr/lazr-meta.js"></script>
There is no setup necessary for the error overlay. When calling display_error() you simply pass the error message that should be displayed.
Y.lazr.error.display_error("Your error message.");
You can optionally pass a node (or a selector) that should be brought to the viewers attention. This node will be flashed red before the error is displayed.
Y.lazr.error.display_error("Your error message.", '#input_box');