08-15-2010 05:44 PM
11-06-2010 06:47 PM
<script type="text/javascript">//<![CDATA[
(function()
{
var element = new YAHOO.util.Element("${fieldHtmlId}");
element.on('contentReady', function() {
// Use an XHRDataSource
var oDS = new YAHOO.util.XHRDataSource("${url.context}${ds}");
// Set the responseType
oDS.responseType = YAHOO.util.XHRDataSource.TYPE_JSON;
// Define the schema of the JSON results
oDS.responseSchema =
{
resultsList : "result",
fields : ["value"]
};
// Instantiate the AutoComplete
var oAC = new YAHOO.widget.AutoComplete("${fieldHtmlId}", "${fieldHtmlId}-container", oDS);
// Throttle requests sent
oAC.queryDelay = .5;
// The webservice needs additional parameters
oAC.generateRequest = function(sQuery)
{
<#if ds?contains("?")>
return "&q=" + sQuery;
<#else>
return "?q=" + sQuery;
</#if>
};
return {
oDS: oDS,
oAC: oAC
};
});
})();
//]]></script>
01-28-2011 07:45 AM
01-29-2012 04:21 AM
02-05-2015 05:34 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.