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.

YUI Library Examples: Logger Control: Logger Integration with YUI Components

Logger Control: Logger Integration with YUI Components

Logger can be used with YUI components to read debugging messages.

Sample Code

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" 
4YAHOO.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 | ?

Copyright © 2013 Yahoo! Inc. All rights reserved.

Privacy Policy - Copyright Policy - Job Openings