Questions tagged as 'javascript'

2
answers

Problems with "NaN" data outputs in javaScript

Hi, I'm doing the typical calculator in javaScript but I have a NaN error in the output every time I run the "SUM" function and I think I'm converting the data well to numbers and I do not see the error. Please someone help me I would appreciate...
asked by 30.01.2018 / 22:13
1
answer

Disable HTML button in JavaScript

I want to make a function in the HTML code itself that every time we press a button a meter adds up to six and when it reaches the limit (6). Leave the button disabled. Any help? This is the button: <button type="button" onclick="r...
asked by 10.10.2017 / 18:12
2
answers

How to order an object according to its key?

I have an object that I need to sort, I'm interested in defining the order of about 4 at least the others could be ordered as they are, saying that this object does not always come in the same order is therefore my query. { gratificacionZon...
asked by 07.10.2017 / 18:03
1
answer

Error with promise and cycle for

I'm starting with Javascript and I still do not handle the asynchronous topic well, promises ... etc The question is, that within a callback I need to access the data of an array (traverse it through a for) and this throws me an error that I...
asked by 31.08.2017 / 13:47
2
answers

IF conditional on jQuery

Good morning, The purpose of this code is to check if a record (number), sent through the form, exists in the database. The submit button (which is invisible) must be displayed on screen if it is confirmed that the record entered exists in th...
asked by 30.08.2017 / 05:00
2
answers

NgFor only supports binding to Iterables such as Arrays

Good morning, I am new at Angular2 and I have some problems with the use of Observables and components ERROR to be fixed    ERROR Error: Can not find a differ supporting object '[object Object]' of type 'object'. NgFor only supports bind...
asked by 13.11.2017 / 16:12
1
answer

How you treat in JavaScript a data from PHP

I have a table where a cell contains an image, which when clicked will execute a function responsible for opening a box dialog with the image in big. <td style="width: 20%;"><?php $source = $row['T_IMG']; echo "<img width='5...
asked by 08.11.2017 / 07:36
1
answer

Plugins Chart.js display the values in the bar chart

Hi, I'm working with Chart.js to show different graphs, in the bar graph that the one that brings me the percent fulfilled I need to show the value on top of the bar, someone could help me, I think we have to work in the options with onComplete...
asked by 14.11.2017 / 16:51
1
answer

Combinations / possible pairs in the same array

I want to pair all the elements of the same array together, but one element can not be paired with itself. The code I got is the following: function combine(list) { var pairs = new Array((list.length * (list.length - 1)) /...
asked by 13.11.2017 / 12:31
2
answers

Execute sentences for a period of time

I want the console.log('ejecutando'); statement to be executed repeatedly for a certain time. At the end of that interval, having set the flag in false , the execution should end. My solution does not work. Why? var bande...
asked by 13.10.2017 / 01:08