Questions tagged as 'javascript'

1
answer

Empty vector displays the end result of the function

I'm doing tests with array / vector and as the first vector display should be shown empty, as second, would come full. What's the problem, why does it occur? And how can I fix it? <ul><li>Murilo</li><li>Mariana</li>...
asked by 26.05.2017 / 15:26
1
answer

How to Decrease Google+ Lyrics

Hello, I would like to know how to customize the letters of Google Charts, I have a graph generated, but the names are great, so they do not all appear, does anyone know a way to decrease the letters or put the words down? p> Follow the...
asked by 25.05.2017 / 17:08
1
answer

Assignment Operator "=" javascript

I do the following: var d = new Date(); var dataInicial = new Date(2017, 5, 1); var dataFinal = new Date(2017, 5, 20); var percorreDatas = function(){ d = dataInicial; while(d <= dataFinal){ d.setDate(d.getDate()+1);...
asked by 26.05.2017 / 02:01
1
answer

How can I create my own protocol as well as HTTP?

See this code below. It creates a server with Node.js. But if I change the var http for example: var xyz = require ("xyz"), var server = xyz.createserver ... gives error. var http = require("http"); var server = http.createServer(functi...
asked by 25.05.2017 / 08:16
2
answers

Code problem

My guessing code is working, however, instead of giving only 3 attempts to the user, the program gives 4 attempts. How do I stop the code in the third attempt ?? var chute = document.getElementById("chute") var tentativa = document.getEle...
asked by 25.04.2017 / 20:32
2
answers

enable and disable submit according to input field validity

I have a form within a modal, it serves for company registration. I'm trying to make the submit button stay disabled until the company's zip and cnpj are typed in the correct way. I've done a similar function for a login field, but I can not mak...
asked by 23.04.2017 / 21:10
2
answers

How to get element id from the find method?

I'm cloning a row in the table, I can insert a new value into id , but would like to concatenate a new value to the existing id . $("#addRow").click(function() { $clone = $('#tabela tbody>tr:last') .clone(true)...
asked by 10.03.2017 / 19:16
2
answers

Read the file of an input using JavaScript

I've created one and would like to read the contents of this input before sending it to the server. I saw that I can do this using a filereader but the information I found was kind of confusing. How can I do this reading? The read would be...
asked by 09.03.2017 / 20:55
1
answer

Protect scripting attack input

I wanted to know how to protect input from script code attacks in the input boxes, if anyone knows how to do it helps a lot <form method="POST" action="index.php?page=dados_encomenda"> <input type="text" class="form-control" name=...
asked by 29.04.2017 / 20:24
2
answers

Click event does not work [closed]

Good evening guys. I am a beginner in HTMl, CSS and Java Script. That's why I'm studying, but today I came across a mistake that I can not find a solution to. I have a responsive 'grid' with images and put an event where I click and JavaScript r...
asked by 04.03.2017 / 03:56