Guest User

Untitled

a guest
Oct 15th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. <div class="col-sm-3 col-xs-12">
  2. <div class="form-group">
  3. @Html.DefaultLabelFor(model => model.CompanhiaId)
  4. @Html.EditorFor(model => model.CompanhiaId, new { Items = Model.CompanhiaList , @onchange = "diretoria(1,'listarByCompany','skill')" } )
  5. @Html.ValidationMessageFor(model => model.CompanhiaId)
  6. </div>
  7. </div>
  8.  
  9. $.ajax({
  10. type: "POST",
  11. url: "@Url.Action('listarByCompany','skill')",
  12. data: {
  13. id: id
  14. },
  15. success: function ajaxSucceess(response) {
  16.  
  17. var dir = $("#DiretoriaExecutivaId").empty(); //Removendo todos os itens
  18. dir.append($("<option>Selecione...</option>"));
  19.  
  20. $.each(response, function (i, response) {
  21.  
  22. dir.append($('<option>', {
  23. value: response.Value,
  24. text: response.Text
  25. }));
  26. });
  27. }
  28. });
Add Comment
Please, Sign In to add comment