Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //list ao usuarios
- $('select[name=Usuario_ID]').change(function () {
- var idUsuario = $(this).val();
- $.get('/grupos/' + idUsuario, function (grupos) {
- $('#Tabela > tbody').empty();
- $.each(grupos, function (key, value) {
- $('#Tabela > tbody:last-child').append(
- '<tr>' +
- '<td>' + value.Grupo_ID + '</td>' +
- '<td>' + value.Grupo_Nome + '</td>' +
- '<td> <input type="checkbox" name="Grupo_ID" id="grupo" value="'+value.Grupo_ID+'"> </td>' +
- '</tr>'
- );
- });
- });
- });
- //method para cadsatro
- $("#Associ").on('submit', function (e) {
- e.preventDefault();
- $.ajax({
- type: "POST",
- url:"PostTesteAsso",
- dataType : "json",
- headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') },
- data : $(this).serialize(),
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement