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 | ? |
You can load the necessary JavaScript and CSS for this example from Yahoo's servers. Click here to load the YUI Dependency Configurator with all of this example's dependencies preconfigured.
Copyright © 2011 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Copyright Policy - Job Openings