Questions tagged as 'javascript'

1
answer

How does v-if work internally?

From what I saw, using v-if you can show and hide an element through a condition, but it does not work as a toggle Jquery, strong> v-if ends up removing the element and is able to return the same element depending on the condition. I ima...
asked by 30.08.2017 / 02:56
2
answers

How to insert text at cursor position?

How can I enter text at the position of a cursor? the field is a contenteditable so it may contain in addition to normal html css texts and images. I took the example in the plugin's documentation: Summernote - How to insert text to cursor p...
asked by 24.07.2017 / 14:32
2
answers

convert json into javascript array

How do I convert the following json into array : { '0': '{ "codBanco":"085","banco":"cecred","cedente":"Aluno 2","datas":"2017/08/30","nosso_numero":"00042200000000099","cedente_cnpj":"06624079975","agencia":"01066","codigo_cedente":...
asked by 23.08.2017 / 20:55
1
answer

Percentage in ajax requests

I wonder if it's possible to create a percentage in Ajax requests. For example: When the form is submitted it starts with 0% up to 100% (when complete) My ajax: index.php <script src="jquery.js"></script> <script> $(...
asked by 10.12.2014 / 13:17
1
answer

How to consume a JSON url without using jQuery

How could I do to consume a URL with data coming from a JSON without using libraries like jQuery or something like this for a structure of type: [{chave:valor1},{chave:valor2}]     
asked by 25.11.2015 / 17:09
1
answer

Identify if the computer has a QR Code reader

The first step of registering my project has two layout options: one for who owns a QR code reader (web cam) and one for those who do not. I need to identify if the user's browser has access to the webcam for reading the QR Code, how can I do...
asked by 14.12.2015 / 16:43
1
answer

Minimum and maximum limit of a number in an input of type number

Hello, I would like to know how I can put a limit, a minimum and maximum number that can be typed in the field. For example, make the number entered in the field below can not be less than 0 and greater than 9. Note: Only integers from 0 to 9...
asked by 15.12.2015 / 17:52
3
answers

Keyup allow to contain only one point between the characters typed in input

Example output: 000.000000 1.000 99.9.99.999 // <- error não pode ter mais de 1 ponto Code: $('input').keyup(function(e){ $(this).val(function() { var val = this.value; return val.replace(/(\.)+/g, function(char, str)...
asked by 03.12.2015 / 00:24
1
answer

Which alternative to use instead of document.write

It is said that document.write is not a good practice, and also does not work after window.onload, which is the case I need. I have the following function that I need to change the document.write, the detail is that I need the content to be adde...
asked by 03.12.2015 / 15:14
1
answer

Is it possible to do form authentication / validation with pure Node.js?

Today I was interested in Node.js because I could program javascript on the backend and front end. From what I understand - correct me if I'm wrong - Node is a platform that allows me to create server-side applications using JavaScript. Lo...
asked by 08.12.2015 / 02:05