Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ajax: {
- url: "GET_JSONDATA.php",
- dataType: 'json',
- type: 'POST',
- delay: 600,
- data: function (params) {
- return {
- q: params.term, // search term
- page: params.page,
- _FORN:1,
- };
- },
- processResults: function (data, params) {
- params.page = params.page || 1;
- currentRequestFamilias=null;
- return {
- results: data.items,
- pagination: {
- more: (params.page * 30) < data.total_count
- }
- };
- },
- cache: true,
- beforeSend : function()
- {
- if(currentRequestFamilias != null)
- {
- currentRequestFamilias.abort();
- }
- if(!FornecedorEscolhido())
- {
- return false;
- }
- },
- }
- ,
- initSelection : function (element, callback) {
- LoadInicialValues();
- if(FamiliasIniciais_==null)
- return;
- callback(FamiliasIniciais_);
- },
- escapeMarkup: function (markup) { return markup; },
- minimumInputLength: 1,
- templateResult: formatoItemSelecionado, //id
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement