Questions tagged as 'javascript'

1
answer

How to reset an input type="file"?

I have the following code: $(function() { // Multiple images preview in browser var imagesPreview = function(input, placeToInsertImagePreview) { if (input.files) { var filesAmount = input.files.length; $(placeToI...
asked by 15.10.2017 / 00:20
1
answer

JavaScript function return

var pegaNomeMedico = { nome : function(){ banco.transaction(function(tx){ tx.executeSql(sqlMedicos.selecionaTodosOsMedicosSemFiltros, [], function(tx, resposta){ var linha = resposta.rows...
asked by 08.09.2017 / 14:33
1
answer

Is it possible to use let and var in the same for loop?

In the code below it would be interesting if I could define i as let and be able to keep pass as var, can you do that without declaring pass in a row above? const randPass = () => { for (var i = 0, pass = ""; i < 8; i++) { pa...
asked by 09.09.2017 / 19:54
1
answer

Image exchange error on the dropdown button

Hello. I have a dropdown menu (bootstrap 3.3.7) that has two images that the exchange of them is done via css. When the menu is active the module button should not be gray but white. Thebelowiscorrect. HTML with PHP calling the menu...
asked by 08.09.2017 / 15:21
1
answer

Express Validator Custom - NodeJS

I'm using express-validator in my api to validate the received data, I'm creating a custom validation to check if the user's email is already registered in the system, but I can not fire a throw new Error('Email em uso'); validator...
asked by 08.09.2017 / 22:40
1
answer

Load event latency calculation with window.performance object

Is the time between the attribute window.performance.timing.connecStart and window.performance.timing.loadEventStart the time it took for the window.onload event to fire? I mean, from the connection until the callback of...
asked by 06.09.2017 / 13:32
3
answers

Disable and keep hover in click

I have three columns in one of this type <td align="center" height="240" width="380" > <img src="imagens/modelo3_thumbnail.png" alt="" class="imagemModelo"> </td> In my JS, I want the user to place the mo...
asked by 06.09.2017 / 19:36
1
answer

Calculator in JavaScript

I'm trying to run the first part of the code so I can continue to do so, but instead of doing the operation when the "+" button is clicked, it goes straight to else . What can I do? window.onload = function(){ var btn = d...
asked by 08.09.2017 / 01:38
1
answer

Sending and Removing from Bank with Jquery

Hello! I recently made another post here, but it was poorly explained. I was wanting to make a form that does an insert in the bank and also removes. I have created a small system of titles, so users can favor those they liked best. It wor...
asked by 06.09.2017 / 22:51
1
answer

How to place event click on graph DonutChart NVD3?

I have a Donut Chart that I need to put a click function and I have read a lot, but nothing has helped yet. Any help is welcome. var nvd3Charts = function() { var myColors = ["#06A705", "#F7A818", "#00BFDD", "#FF702A", "#DA3610", "#80CD...
asked by 28.08.2017 / 20:01