Questions tagged as 'javascript'

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
1
answer

Decode string encoded by javascript in C #

Hello, this is the following .. In the site I am building, I record an information in the database, this information is a json, to be able to send this data to the database, I code them by javascript like this: p> encodeURI(dados); After tha...
asked by 15.05.2018 / 21:47
2
answers

How to translate this if javascript to PHP?

How would this if in javascript be in php? ... telefone = "11222223333"; // exemplo for (var n = 0; n < 10; n++) { if (telefone == new Array(11).join(n) || telefone == new Array(12).join(n)){...
asked by 18.05.2018 / 18:48
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

How to change color in html

I'm trying to change a snippet of HTML code to red, but the code below does not work. I thought the color="red" would work. Note: this is html embedded in javascript. When I remove the excerpt from the color, that is, color="red", the code runs...
asked by 14.05.2018 / 21:21
1
answer

Loading script asynchronously

I have an administrative system using adminLTE. In the side menu I load all my scripts asynchronously (at least it was expected). But when I load an HTML asynchronously, and inside that file I load an external javascript, it gives me the followi...
asked by 09.02.2018 / 18:58
3
answers

List links on a page

Good morning! I have this script that lists all the links of a page, but does not bring the name of the link but only the address, can you name the link instead of the address? javascript: var a = document.getElementsByTagName('a');var b = a.l...
asked by 06.02.2018 / 16: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
1
answer

Jquery event click after attribute change

I have a problem here with Jquery, when the button is clicked I need to get the value of the input and replace the 'href' attribute of one and at the same time click on it ... I'm not having results, I can do the part of overriding the value of...
asked by 07.02.2018 / 11:57