YUI recommends YUI3.
YUI 2 has been deprecated since 2011. This site acts as an archive for files and documentation.
This documentation is no longer maintained.
Logger can be used with YUI components to read debugging messages.
CSS:
1 | /* custom styles for this example */ |
2 | #statesautocomplete {width:20em;} |
view plain | print | ? |
Markup:
1 | <div id="statesautocomplete"> |
2 | <input id="statesinput"> |
3 | <div id="statescontainer"></div> |
4 | </div> |
view plain | print | ? |
JavaScript:
1 | <script type="text/javascript" src="./logger.js"></script> |
2 | <script type="text/javascript" src="./autocomplete-debug.js"></script> |
3 | <script type="text/javascript" |
4 | YAHOO.example.LogAutoComplete = new function() { |
5 | // Instantiate LogReader |
6 | this.oLogReader = new YAHOO.widget.LogReader(); |
7 | |
8 | // Instantiate DataSource |
9 | this.oACDS = new YAHOO.util.FunctionDataSource(getStates); |
10 | |
11 | // Instantiate AutoComplete |
12 | this.oAutoComp = new YAHOO.widget.AutoComplete('statesinput','statescontainer', this.oACDS); |
13 | }; |
14 | </script> |
view plain | print | ? |
All YUI 2.x users should review the YUI 2.8.2 security bulletin, which discusses a vulnerability present in YUI 2.4.0-2.8.1.
Copyright © 2013 Yahoo! Inc. All rights reserved.