Questions tagged as 'javascript'

3
answers

How to convert numeric value to boolean?

I get a boolean value of the database, in which I want to set a checkbox dynamically. The value received is 0 or 1 . I tried to do it this way below: var status = 1; //valor recebido $("#status").prop('checked', stat...
asked by 26.01.2017 / 23:42
1
answer

More than one chart with Chart.js

Hello, I'm having trouble trying to show more than two charts with chart.js; At the moment I have two graphics that load perfectly into my code ( ctx, ctx2 ), since when I try to load the third one, it does not show and it results in my...
asked by 20.01.2017 / 14:26
2
answers

Passing Parameters from Several Checkboxes to a Jquery Variable

Hello, I would like to know how I get the value field values from several selected checkboxes and save them to a jquery variable separated by commas, but without using the id field, since it is already being used in a label .     
asked by 07.10.2016 / 23:15
1
answer

Complete Regressive Chronometer in Pure JS - Problem Counting

People, I am creating a regressive timer with the buttons (start, pause, reset, restart and save time) with the initial time being set in an input as well. I searched several times in various posts in the .stackoverflow and other internet fo...
asked by 20.05.2017 / 08:29
1
answer

click () does not recognize button dynamically inserted inside tr

I dynamically insert items into a table using the following function: $("#inserir-item").click(function (){ ... $("table#tb-itens tbody" ).append(retorno); } The return variable contains something like: "<tr id="tr-22-2222" ali...
asked by 09.05.2017 / 22:22
1
answer

ASP.NET MVC Calculate value in a table

I am developing a register where I will have a table with some additional details that must be inserted together with the main register. But one of the columns of this table is calculated, which is where I'm having difficulty pe...
asked by 28.04.2016 / 02:05
2
answers

Search array position from a given term without using the 'inArray'

In a given method, from my input, when typing "me" it checks if the fruit exists in this array: ['banana', 'melao', 'uva', 'melancia'] In this case, bring me (position 1 - melao and position 3 - watermelon). I've tried using inArray...
asked by 21.03.2016 / 15:57
2
answers

Determining the time at which function to execute

Example: var horaAtual = new Date(); var horaInicio = new Date("Fri Apr 01 2016 23:30:00"); //Quando(horaAtual == horaInicio) //execute algo... I want a function to run when it reaches an hour already set in my code, without the user need...
asked by 02.04.2016 / 04:22
3
answers

Multiply row

Personnel how can I multiply the total value of the row being that I want to multiply value by value of each line var bloco1 = $("table tr").find("td").eq(0).val(); var bloco2 = $("table tr").find("td").eq(1).val(); var bloco3 = $("tab...
asked by 18.03.2016 / 13:01
1
answer

How to make a select html load a list of options each time another select change selection?

I need to have a select load a list of option each time on a previous select change of selection. I know I will use JavaScript to do this, but how? Follow the code: <b>Área:</b></td> <select name="area" id="area">...
asked by 30.03.2016 / 17:08