Questions tagged as 'javascript'

1
answer

How can I validate current time

How could you develop routine [code block], in order to treat the text field where you have to insert the Hours in real time (current time, arising from the moment). If the user tries to add hours past - issue warning that can not enter daylight...
asked by 19.04.2018 / 22:57
1
answer

Multiple Prototypes

I would like to know how to add a prototype to a function that is already instantiated in a prototype. Example below: app.js 'use strict'; function NivFire(){ this.db = "", this.admin = "", this.reference; } NivFire.prototype = {...
asked by 21.04.2018 / 21:55
2
answers

Page reloading when using .click Jquery

I have a view that when clicking a button opens a modal and clicking the modal button inserts a row into a table and is working correctly. In this included line it has a <a class="btn-remove-row" href=""><i class="mdi mdi-close-circl...
asked by 05.04.2018 / 14:55
1
answer

How to refresh the page and stop updating?

I am making the following code: if(xhr.status == 200){ console.log(xhr.responseText); window.location.reload(); } But when I do this, it seems like it goes into an eternal loop and crashes my server. How do I make it r...
asked by 28.04.2018 / 04:03
1
answer

Reactivity in event

I'm having a problem changing the render state of an element with vue js. The same was generated with for . The goal is to have box-body of the mini panel displayed by clicking button . but the v-if state is changed onl...
asked by 27.04.2018 / 11:09
1
answer

Doubt fwrite writing to file

I have a problem writing a file using fwrite, I can create the file normally, however at the time of writing I get the following error: Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or va...
asked by 24.03.2018 / 15:26
1
answer

How can I change the state of an array item in React Native

I have a list that is loaded after the api returns, this list populates a FlatList. By clicking on any item I would like to mark it with the status it was viewed: userViu How can I change the item just clicked. [ { "id": 3,...
asked by 24.03.2018 / 22:55
1
answer

SetTimeOut does not work

I'm using a Google API, and I need it to wait for at least 3 seconds before making another request, I tried to do this but I could not, setTimeOut does not wait for 3 seconds! function getLatLong(polos, res) { polos.forEach(element =>...
asked by 26.03.2018 / 19:38
1
answer

javascript error Can not read property 'value' of null

I created a function in javascript, but it returns the following error:    Can not read property 'value' of null Here's a piece of code: function Distribuir(control) { var tr = $(control).parents('tr'); var quan...
asked by 26.03.2018 / 20:32
1
answer

How to get the result of adding two values of type float when clicking on an input?

<script type="text/javascript"> function somarValores(){ var s1 = document.getElementById("s1").value; var s2 = document.getElementById("s2").value; var s3 = parseInt(s1) + parseInt(s2); return s3; }...
asked by 26.04.2018 / 13:38