Chosen + POST Javascript

0

Good morning, I have 1 field <select> with chosen where I will select the user. Through the post Java function, I retrieve the available permissions to assign to the user and put in a <select multiple> , however the postback is not showing <select multiple > with plugin chosen, but a <select> bootstrap.

Picture:

PostFunction:

functioncarrega_permissoes(){$.post('view/teste.php',function(retorna2){//Mostradentrodaulosresultadoobtidos$(".permissao_usuario").html(retorna2);

                                                });

}

"test.php" file

<div class="row">

                <div class="col-4">

                      <div class="form-group">

                    <label class="form-label">Permissão</label>
                    <select class="form-control custom-select form-control-chosen" id="permissao_usuario_selecao" multiple name="permissao_usuario_selecao">

                        ';

                // RETORNA CONTROLES DE ACESSO ACESSO

               $sqlClientesUsuarios = mysqli_query($_SG['link_acesso'],"SELECT * FROM  controle_acesso" );



                            while ($escreverUsuarios = mysqli_fetch_array($sqlClientesUsuarios)) {           

                                                echo    '<option value="'.$escreverUsuarios['iden_cod_controle_acesso'].'">'.$escreverUsuarios['descricao_controle_acesso'].'</option>';


                            }                   




              echo '     
                    </select>
                  </div>
                </div>
                <div class="col-1">
                </br>
                    <button onclick="carrega_loading()" class="btn btn-success ml-lg-0"> Continuar</button>
                </div>  

            </div>
    
asked by anonymous 17.05.2018 / 17:11

0 answers