Questions tagged as 'javascript'

3
answers

Basic question JavaScript: How to change an attribute of an object?

I came across a slightly different situation and I was in doubt. I would like to know the following, I have an array of objects and in each object I have two attributes in it {valor: "texto", tamanho: "médio" } . I would like to cre...
asked by 17.12.2017 / 08:09
2
answers

Sending data with ajax

I have an online chat that works with ajax and PHP . However, strangely, when I type only an interrogation ( ? ) and send the jQuery , it returns an error in the console. ajax enters error() and the query ( ? ) is inse...
asked by 12.08.2018 / 21:32
1
answer

How to make multiple requests in parallel in axios?

I have two urls to make the request: link and link I would like to make requests for both in parallel, currently I have done separately as in the code below: axios .get('https://api.tuuris/cities') .then(response => { this....
asked by 01.08.2018 / 18:50
3
answers

How to get the value of an input using the name javascript attribute

I was testing some code and realized that I was not able to get the value of a input through the attribute name document.getElementsByName().value , but with id working normally. Is it possible to get the value using name...
asked by 05.08.2018 / 06:40
1
answer

displayed result exceeding the condition

I have the following code snippet: var num = 0; while (num <= 12) { console.log(num); num = num + 2; } Checking here now at the time of posting the doubt, I saw that the result counts until 12, but testing in the console...
asked by 07.08.2018 / 00:17
1
answer

Showing data as you type

I need to show two information when the user enters the commission amount, in case the information I should show would be IR and Valor líquido . For example, if the user types 1.200,00 , the IR label would appear 1...
asked by 26.09.2017 / 14:02
2
answers

Javascript: How to insert multiple blanks into a paragraph p element?

Good afternoon! I'm inserting within a TAG HTML% with% some blanks, to complete the number of characters within a certain description (120). I need white space to be visible on the page. TAG : <p> However, I'm...
asked by 07.08.2018 / 20:14
1
answer

Dynamize language for placeholder

I do an ajax request to fetch in the database to bring the language configuration, type, PT-BR, EN, and so on ... I want the placeholders to be changed according to the chosen language. For example, instead of being placeholder='Digite seu...
asked by 29.08.2017 / 01:31
2
answers

How to make a listbox where I can select more than one value?

I want to make a listbox, where the user can select several options, but using the select multiple, I have to hold ctrl, but this is not ideal, many people will not know that. Can anyone help? <div class="form-group">...
asked by 07.09.2017 / 05:19
2
answers

Validate field with integer value, in decimal format (check if value is less than)

Hello, my question is about a field validation for decimal value. If the value is less than 500.00 I show an error message, otherwise step to the second field, as soon as the person types the value, the mask is already added. I'm using it thi...
asked by 21.09.2017 / 21:30