Questions tagged as 'javascript'

1
answer

Print with setInterval in the same place

I need to make sure that when "filling ..." is printed by setInterval , it's exactly the same place as the first impression. It turns out you're going down or forward. Is there any way to do this, print several times in the same place in 3...
asked by 02.09.2017 / 02:10
1
answer

Check if a string is a number and check if it is a special character

Hello, I am learning the JavaScript condition statements and I am doing an exercise, the purpose of the program is: The user types a letter, the program checks if the letter is a vowel or a consonant , so I made this code: var letra = prompt(...
asked by 15.01.2018 / 19:04
1
answer

Color change on chart with ChartJS not working

Could you please help me in the case below? I'm trying to change the color of the chart to red, but the change is not working. Code:functionDevolucao(){if(CicloAtual!="") { var codCli = $("[id$=txtCodigo]").val(); var ciclos = Arr...
asked by 06.09.2017 / 16:19
1
answer

Validation of select without form

I have a view where I have dynamically generated selects and a link. I need to make sure the selects are selected when clicking the <a id="add-cart" href="{{ route('site.add.cart', $product) }}" class="btn btn-danger mt-5">Adicionar ao...
asked by 17.01.2018 / 18:20
3
answers

How to convert a string to boolean? [closed]

In JavaScript, when running Boolean('false') The returned value is true and the expected value was false , since strings with any non-empty content when converted to boolean return true and empty false . What is...
asked by 06.09.2017 / 15:22
1
answer

Get value of data-cod element

How do I get the value of the data-cod element? $(document).ready(function() { $('.chatUsuariosLista').click(function() { $("#para").val(this.id); }); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2....
asked by 19.08.2017 / 17:25
1
answer

Open Modal Vuetify

I'm having trouble opening a Modal with Vue, I'm using Vuetify, I can open it, as they show in the documentation, but I can not open it, just by clicking on a button (for example). <v-dialog v-model="dialog" width="600px"> <v-card...
asked by 17.08.2017 / 20:11
2
answers

How to cause an XMLHttpRequest error?

I would like to understand in which cases readyState will be equal to 4 and status will be different from 200 and the difference of that for event onerror : xhr.onload = function (e) { if (xhr.readyState === 4) {...
asked by 24.08.2017 / 20:50
2
answers

Can a static method have the same name as a property?

Since a static method is not going to be an object method, can I have a static method with the same name as a property defined inside the constructor?     
asked by 22.08.2017 / 17:58
1
answer

Uncaught TypeError: $ .ajax is not a function?

What problem with my code, in the console shows this error: home:85 Uncaught TypeError: $.ajax is not a function at HTMLFormElement.<anonymous> (home:85) at HTMLFormElement.dispatch (jquery-3.2.1.slim.min.js:3) at...
asked by 22.08.2017 / 22:42