2 function get_select_box(type, div_id, options) {
4 //alert(JSON.stringify(options));
6 url: '/ajax/html/select/'+type,
8 beforeSend: function(){
9 var html = '<div class="well well-sm"><center><img src="/img/wheel.gif" /></center></div>';
10 jQuery('#'+div_id).html(html);
12 success: function(response) {
13 jQuery('#'+div_id).empty();
14 jQuery('#'+div_id).html(response.select);
15 if (options.live_search) {
16 var select = jQuery("#"+options.id);
17 select.selectpicker('render');
18 select.data('selectpicker').$button.focus();
19 select.data('selectpicker').$button.attr("style","background-color:#fff");
22 error: function(response) {
23 alert("An error occurred");