"); YAHOO.example.RemoteCustomRequest = function() { var oDS = new YAHOO.util.ScriptNodeDataSource("http://api.idx.diversesolutions.com/API/Locations/9649/104?maxAreasToReturn=10&"); oDS.responseSchema = { resultsList: "", fields: ["LocationName","LocationCacheTypeID","TotalCount"] }; // Instantiate AutoComplete var oAC = new YAHOO.widget.AutoComplete("idx-q-Cities","autocomplete", oDS); oAC.queryMatchContains = true; oAC.queryQuestionMark = false; oAC.useShadow = true; oAC.queryDelay = .1; oAC.typeAhead = false; oAC.allowBrowserAutocomplete = false; oAC.alwaysShowContainer = false; oAC.resultTypeList = false; oAC.maxResultsDisplayed = 10; oAC.generateRequest = function(sQuery) { return "partialName=" + sQuery + "&format=json"; }; oAC.resultTypeList = false; oAC.formatResult = function(oResultData, sQuery, sResultMatch) { if (oResultData.LocationCacheTypeID == '1') { type = "City"; } else if (oResultData.LocationCacheTypeID == '2') { type = "Community"; } else if (oResultData.LocationCacheTypeID == '3') { type = "Tract"; } else if (oResultData.LocationCacheTypeID == '4') { type = "Zip"; } else if (oResultData.LocationCacheTypeID == '5') { type = "County"; } return (sResultMatch + " (" + type + ")"); }; oAC.itemSelectEvent.subscribe(HiddenFieldSet); return { oDS: oDS, oAC: oAC }; }(); function HiddenFieldSet(e, args) { if (args[2].LocationCacheTypeID == '1') { YAHOO.util.Dom.get("LocationType").value = "City"; } else if (args[2].LocationCacheTypeID == '2') { YAHOO.util.Dom.get("LocationType").value = "Community"; } else if (args[2].LocationCacheTypeID == '3') { YAHOO.util.Dom.get("LocationType").value = "Tract"; } else if (args[2].LocationCacheTypeID == '4') { YAHOO.util.Dom.get("LocationType").value = "Zip"; } else if (args[2].LocationCacheTypeID == '5') { YAHOO.util.Dom.get("LocationType").value = "County"; } YAHOO.util.Dom.get("LocationCount").value = args[2].TotalCount; }
Source: http://tulsa.pruhomequest.com/good-news/guthrie-green-park-named-in-downtown-tulsa/
real life barbie zipper armenian genocide asteroid mining memorial day ivan rodriguez planetary resources
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.