Advertisement
Guest User

Untitled

a guest
Jul 7th, 2015
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. $('input[name=motor]').on('change', function() {
  2. var fabricante = $('select[name=fabricante]').val();
  3. var seguimento = $('select[name=seguimento]').val();
  4. var veiculo = $('select[name=veiculo]').val();
  5. var motor = $(this).val();
  6.  
  7. $.ajax({
  8. method: 'post',
  9. url: 'combo.php',
  10. data:{opcao: 'motor', fabricante: fabricante, seguimento: seguimento, veiculo: veiculo, motor: motor},
  11. dataType: 'json',
  12. beforeSend: function(){
  13. $('#status').html('Aguarde, buscando...');
  14. $('div#conteudo').html('');
  15. },
  16. success: function(data){
  17. $('#status').html('');
  18. $('div#conteudo').html(data.conteudo);
  19. $('input[name=n_processo').val(data.processo);
  20. }
  21. });
  22.  
  23. $("input[name=motor]").keydown(function (e){
  24. if(e.keyCode == 13){
  25. $("input[name=motor]").blur();
  26. }
  27. });
  28. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement