Questions tagged as 'jquery'

2
answers

How to generate HTML at a specific point on the page?

I'm learning to program in JavaScript and jQuery, and I'm having trouble generating HTML code. Given an HTML body how do I insert HTML code inside a specific place? In the case below I already know how to insert a paragraph at the end of &...
asked by 01.03.2018 / 16:46
2
answers

Get input values from a given form

I have the following scenario: Multiple forms, however, I need to set all inputs only from the form that is in action, which is triggered by the button. function enviaForm(id){ $(id).submit(function(){ var answer = $("input[n...
asked by 01.03.2018 / 08:12
1
answer

How to execute a function after ajax success?

In my project, in the ajax success, I'm doing an autocomplete, so I need to execute a function after selecting an option, that is, after success. Would it be possible / How would I do it?     
asked by 26.03.2018 / 20:14
1
answer

If within a success in ajax

I make the request, I get the right value, but at the time of verification it does not work $.ajax({ url:'includes/checkCPF.inc.php', method:'POST', type:'POST',...
asked by 22.02.2018 / 20:09
2
answers

Add numbers within input in sequence when clicking

I have this input <input type="text" readonly="readonly" class="form-control form-sm input_digitacao"> And I have this script $(".numeros_ligacao li a").click(function(){ digito = $(this).html(); $(".input_digitacao").val(di...
asked by 26.03.2018 / 22:31
1
answer

How to remove class from a dynamically created field?

I'm trying to remove a class from a label created dynamically by handlebars, But I can not find the label with the id of it; In the console if I pass the idLabel it returns the right id. "9-hb_usuario-label" But when I try to do $('...
asked by 23.05.2018 / 16:08
2
answers

How to disable an option when creating it with jquery

vetorAux = ["CARROS","Ferrari","Porshe"]; vetorAux.forEach(function(item){ $('select').append('<option>' + item + '</option>'); }); <!DOCTYPE html> <html> <script src="https://ajax.googleapis.com/ajax/lib...
asked by 04.05.2018 / 03:50
2
answers

Variable value does not change inside ajax

I'm trying to assign a value to a variable within the success of an ajax, however, when checking the value of that variable, this value is with the creation value of the variable, var emailPessoa = ''; $.ajax({ url: api/aluno/id, type:'...
asked by 08.05.2018 / 22:18
1
answer

Form validation does not work with jquery

I have this ajax code that makes a request for a php page $(document).on('click', '#reg-discagem input[type="submit"]', function(e){ $("#form-content_discagem").html('<div class="spinner"></div>'); e.preventDefault();...
asked by 05.02.2018 / 18:26
1
answer

pass variable from javascript to php and write to database

I need to get the alert variables and move to PHP, and then write to the bank, the bank record and quiet, what is not getting and send to test page <script src="https://code.jquery.com/jquery-1.10.2.js"></script><script>s...
asked by 05.02.2018 / 16:54