Questions tagged as 'javascript'

1
answer

Create dynamic chart using mysql and Highcharts

Personal I'm trying to create a chart using Mysql and Highcharts on a local Xampp server. However, when running index.php only the source code of the page is displayed, not generating the graphic. Following is the database, table, connection...
asked by 14.08.2016 / 19:33
2
answers

Input name with dynamic name

I want to create a form with a variable number of inputs, according to the amount of data coming from a DB and assign them to the "name" unique names. Then I need to submit this form and retrieve the data via POST. I thought I'd do somethi...
asked by 03.11.2015 / 03:13
2
answers

Modules vs Classes in JavaScript

I'm starting to work with JavaScript Classes. But I see that some people use and recommend building a separate project by modules. Since I still do not have experience working in these formats, I would like to know: What are the advantages of...
asked by 24.08.2016 / 22:48
2
answers

Dynamically change the text color based on a background color

Galera, I have this code where it generates a kind of link theme and I'd like to apply that code to it for that the text contrasts with bg, How can I do this because my bg and the color of the text are random? But I wanted the code to give...
asked by 22.07.2015 / 19:25
4
answers

Get tag link a with javascript. For active menu script

I'm making a template and I need to put the active page in different color from the other buttons. For this I need to get the contents of one and compare it with the page link. If it is the same I put a new class on the button where it will p...
asked by 24.07.2015 / 16:28
3
answers

Problem in the price formatting function

I have a preformatted value of 6.5 . If I put this function, it returns 0,65 . If I put 19.5 it returns 1,95 . Why does this happen? function formataReal(numero) { var tmp = numero + ''; var neg = false;...
asked by 10.08.2017 / 16:05
2
answers

Function in js that hides and shows independent divs

I am putting together a Quiz where each click takes the user to a part of the Quiz. Everything is loaded on the same page so it does not skip between pages. Each slide is contained in its own div and within them the buttons that lead to o...
asked by 16.08.2017 / 21:02
3
answers

Curbing javascript values

I'd like to do a "rounding" of values within the javascript. I know that the Math.Round() function rounds, but only decimal, I need the following situations. 1 - 10 in 10 ... If the user types 155, the system rounds to 160, If the u...
asked by 16.08.2017 / 14:22
1
answer

Treat 404 in html5 video

How can I handle errors like 404 in the html5 video tag? I took a look at all available events and the only one that should serve in this case was the onerror , however, when I define it by means of an attribute in the tag. The same can never f...
asked by 18.05.2016 / 16:11
2
answers

Erasing rows from bottom to top

I'm using the method innerHTML(); to display 60 lines on the page. As soon as I need to delete 20 to 20 lines to each click on the button. Full source code: for (i = 0; i <= 60; i += 1) { document.getElementById("...
asked by 19.05.2016 / 10:14