YUI Library JavaScript DHTML






#statesautocomplete {width:20em;}




Type a state (will output log messages):



    
    






var loader = new YAHOO.util.YUILoader();
loader.insert({
    require: ['autocomplete','logger'],
    base: 'yui_2.7.0b-lib/',
    filter: 'DEBUG',
    onSuccess: function(loader) {
        YAHOO.example.LogAutoComplete = new function() {
            // Instantiate LogReader
            this.oLogReader = new YAHOO.widget.LogReader();
            // Instantiate DataSource
            this.oACDS = new YAHOO.util.FunctionDataSource(getStates);
            // Instantiate AutoComplete
            this.oAutoComp = new YAHOO.widget.AutoComplete('statesinput','statescontainer', this.oACDS);
        };
    }
});




   
  
yui_2.7.0b.zip( 4,431 k)