Questions tagged as 'javascript'

2
answers

When uploading, the filename turns the title

Colleagues. Is it possible for the user to upload a file, the file name to turn the page title? For example: The user will fill out a form where the first field is the file upload and the second field is an input text. When he selects the...
asked by 23.01.2017 / 17:17
1
answer

Make infinite count of ordinal numbers and expose in HTML document

What I want to know is how can I make a rising counter in pure Javascript 0, 1, 2, ... I want something automatic, infinite without requiring an integer or negative integer The count can be started from 0 or 1 onwards ... Example <...
asked by 23.01.2017 / 15:14
2
answers

convert JSON to object

I have the following json [ {"name":"razao_social","value":"INTELIDER"}, {"name":"nome_fantasia","value":"INTELIDER LTDA"}, {"name":"cpf_cnpj","value":"10.999.558/0001-86"}, {"name":"rg_insc_estadual","value":"132456789"},...
asked by 24.06.2017 / 19:22
4
answers

Get the smallest value and highest value of an array with JavaScript?

How do I get the lowest value and highest value of the array separately with javascript and jQuery?    var arr = ["885.9", "984.9", "444.9", "528.9", "528.9"]; The lowest value in this case is 444.9 and the highest 984.9.     
asked by 23.06.2017 / 22:56
1
answer

search and replace string javascript

I have the following syntax: var json_pessoa = JSON.stringify(json_pessoa["pessoa"]); // o valor do json_pessoa é "{"razao_social":"asd","nome_fantasia":"asd","rg_insc_estadual":"asd"}" , ele já é iniciado com as aspas var json...
asked by 26.06.2017 / 17:52
1
answer

Error sending Json

I have the following variable: json_envio = JSON.stringify (obj); The value of it is: "{"usuario": {"login":"gleyson", "senha":"1"}, "razao_social":"INTELIDER", "nome_fantasia":"INTELIDER LTDA", "cpf_cnpj":"10999558000...
asked by 27.06.2017 / 16:00
3
answers

Format string or float for currency

I've been researching this but I have not found a solution. I have for example a float: 2087500 , I want to leave it as follows $ 20,875.00 I found several methods of passing float to coin but everyone has a period (.) before the last two...
asked by 26.06.2017 / 19:22
2
answers

Help with sum

I want to write an algorithm, in JAVASCRIPT, that reads an N numbers and adds only the even numbers var n1, n2, n3, soma; n1 = parseInt(prompt("Digite o 1º Número :")); n2 = parseInt(prompt("Digite o 2º Número :")); n3 = parseInt(prompt("Digit...
asked by 14.09.2017 / 22:35
4
answers

Put in Required function

I want the text box to be mandatory in order to fill it out, can you help? <html> <body> <p>Please input a number between 1 and 10:</p> <input id="numb"> <button type="button" oncl...
asked by 15.09.2017 / 13:31
5
answers

Enter value "X" after some characters

In my form, you have textarea and would like to add the character X , without submitting the page, every 10 characters typed. Example: AAAAAAAAAA**X**BBBBBBBBBB**X**EEEEEEEEEE**X**12345678.... As the user typed in, he would...
asked by 20.09.2017 / 21:32