1 var coursetagdivs = null;
2 var coursetag_tags = new Array();
4 function init_tag_autocomplete() {
5 YUI().use('yui2-autocomplete', 'yui2-datasource', 'yui2-animation', 'yui2-connection', function(Y) {
6 var myDataSource = new Y.YUI2.util.XHRDataSource("./tag_autocomplete.php");
7 myDataSource.responseType = Y.YUI2.util.XHRDataSource.TYPE_TEXT;
8 myDataSource.responseSchema = {
12 myDataSource.maxCacheEntries = 60;
14 // Instantiate the AutoComplete
15 var myAutoComp = new Y.YUI2.widget.AutoComplete("id_relatedtags", "relatedtags-autocomplete", myDataSource);
16 document.getElementById('id_relatedtags').style.width = '30%';
17 myAutoComp.allowBrowserAutocomplete = false;
18 myAutoComp.maxResultsDisplayed = 20;
19 myAutoComp.minQueryLength = 3;
20 myAutoComp.delimChar = [","," "];
21 myAutoComp.formatResult = function(oResultData, sQuery, sResultMatch) {
22 return (sResultMatch);
26 myDataSource: myDataSource,
27 myAutoComp: myAutoComp