Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

php - jquery autocomplete: works for first value, how to enable it for next? -


i'm using autocomplete user can easly enter data on inputs, this:

 <? $a = new etiqueta(0, ''); $b = $a->autocomplete_etiquetas(); ?> <script type="text/javascript">     function cargar_autocomplete_etiquetas(){         $("#tags").autocomplete({             source: [<? echo $b; ?>]         });     } </script> 

$a = $b array result like: 'help','please',i','need','to,'be able to', 'select next item',' autocomplete';

and checked ui documentation, doesn't fith source method.. idea? i'm trying (edited bugai13 aportation):

 <? $a = new etiqueta(0, ''); $b = $a->autocomplete_etiquetas(); ?> <script type="text/javascript">     function cargar_autocomplete_etiquetas(){     $("#tags").autocomplete({         source: [<? echo $b; ?>],         multiple: true,         multipleseparator: ", ",         matchcontains: true     }); }  </script> 

but don't know how it.. idea? .push , .pop functions autocomplete? or shall define, them?

thanks again!

ps: i'm getting adicted site! ps: come on dudes, think answer usefull many people ps: allowed offer paypal reward?

i've use following work multiple autocomplete tags ',' separator, hope your:

it's full code work. in case in parse function items json array, try add parse method:

   $("#txttags").autocomplete(urlfactory.tags_autocomplete_url, {     matchcontains: true,     width: 320,     max: 10,     highlight: false,     multiple: true,     multipleseparator: ", ",     scroll: true,     scrollheight: 300,     datatype: "json",     parse: function (data) {         var result = result.fromjson(data);          var items = result.getjson("tags");         var arr;         if (items != null)             arr = items.split(",");         return $.map(arr, function (row, i) {             return {                 data: row,                 value: row,                 result: row             }         });     },     onitemselect: function () {      },     formatitem: function (data, i, n, value) {         if (value != null) {             value = ltrim(value);             value = rtrim(value);         }         return value;     } }); 

so, need this:

function cargar_autocomplete_etiquetas(){     $("#tags").autocomplete({         source: [<? echo $b; ?>],         multiple: true,         multipleseparator: ", ",         matchcontains: true     }); } 

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -