Posts by danguilherme • 489 points
8 posts
-
1
votes4
answers1878
viewsA: Updating an element with Javascript
For a simple code like that, I wouldn’t even use the for: var inicial = 0; var numeros = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; var lugar = document.getElementById('lugar'); var ul =…
-
1
votes1
answer315
viewsA: Angular JS - $http.delete "Syntax error on token '.' ,, (comma) expected " on Eclipse
delete is a reserved word in Javascript, and some interpreters have trouble reading it between expressions (such as the old Internet Explorer and probably the Eclipse interpreter). What you can do…
-
2
votes1
answer1040
viewsA: How to use the Github API in ASP.net
DRT; Use normal HTTP requests to access the API by reading the return JSON data. A Little Bit of Background The Github API is an API RESTful, which basically means that your data is accessible by…
-
0
votes2
answers485
viewsA: How to send record only once in INSERT
Add a Javascript header to the button so that once it is clicked, it is disabled - no more clicks: Via script (recommended): document.getElementById('idDoBotao').addEventListener('click',…
-
8
votes1
answer97
viewsA: setInterval does not repeat
The problem is that you are passing the function result teste to the setInterval. setInterval(teste(), 1000); // 'teste' é executado, e, como ele não retorna nada, essa linha é equivalente a:…
javascriptanswered danguilherme 489 -
0
votes3
answers1981
viewsA: Rescue the index of an object with a certain attribute within an object array
You can use the function filter or foreach array. The advantage of the first is that you can pick up the full item: var auxIndex = -1; // com filter var item = listaImagens.filter(function(i, idx) {…
-
18
votes3
answers6360
viewsA: What is Google Polymer?
Polymer is a library that facilitates the creation of Web Components, which are customized, independent and reusable HTML elements. The idea is that you can create your own components only with…
polymeranswered danguilherme 489 -
4
votes1
answer110
viewsA: Button triggers the method of your container
Like the div #fechar is inside the div #aba, the browser understands that when you click on #fechar, you intend to click both on it and on the element that is "behind" it, in this case, the #aba.…