Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 2nd, 2012  |  syntax: None  |  size: 1.09 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How to remove auto suggest functionality on Textbox
  2. function SetAutoSuggest(ProductType) {
  3.  
  4.     if (ProductType == "PRODUCT") {
  5.  
  6.         $("#PantryFooodItemName").autocomplete('<%= Url.Action("GetAutosuggestProductlistForMeal", "Autosuggest") %>',
  7.             {
  8.                 minChars: 2,
  9.                 width: 300,
  10.                 multiple: false,
  11.                 matchContains: true,
  12.                 mustMatch:true,
  13.                 formatItem: formatItem,
  14.                 formatResult: formatResult
  15.             }
  16.             );
  17.  
  18.  
  19.  
  20.  
  21.  
  22. }
  23. if (ProductType == "CUSTOMPRODUCT") {
  24.     $("#PantryFooodItemName").autocomplete('<%= Url.Action("GetCustomProduct", "Autosuggest") %>',
  25.             {
  26.                 minChars: 2,
  27.                 width: 300,
  28.                 multiple: false,
  29.                 matchContains: true,
  30.                 mustMatch: true,
  31.                 formatItem: formatItem,
  32.                 formatResult: formatResult
  33.             }
  34.             );
  35.  
  36. }
  37.     }
  38.        
  39. source: function(request, response)
  40. {}
  41.        
  42. [{"id":25,"label":"mylabel","value":"myval"},{"id":26,"label":"mylabel26","value":"myval26"}]