Questions tagged as 'javascript'

1
answer

Error when implementing TensorFlow in React Native

Save! I'm trying to implement the TensorFlow library in my React Native application, based on ese e in this tutorials. But I can not even run the project, getting the following error:    Unable to resolve module ../assets/graph.pb...
asked by 30.10.2018 / 17:03
1
answer

How to call a function inside an addEventListener?

I would like to know if it is possible to call a function within a given event using addEventListener (). I have this function, which adds a reward to the database: //Função que adiciona uma recompensa ao banco de dados addReward(){...
asked by 07.11.2018 / 19:41
0
answers

Alignment of elements per line

I'm trying to align the elements, but to no avail. The idea is to limit only 8 elements per line, in addition to not doing so, it still returns error: Misalignedelements: Codes:Html:<divclass="col-lg-12"> <div class="box">...
asked by 07.11.2018 / 20:11
1
answer

Task Scheduling [closed]

I would like to know if it is possible to schedule tasks with javascript, that is, I have a javascript script and if it were possible "of course" the 01:00 hour would be executed automatically. I know this in other server languages is possibl...
asked by 30.10.2018 / 21:50
0
answers

Do not stop submitting with e.preventDefault ();

I have this function below, but it is not stopping in e.preventDefault(); , it executes and executes submit of the page. Here's how I'm doing: $('#ClienteEditar').submit(function (e) { e.preventDefault(); var url = "/Clie...
asked by 30.10.2018 / 21:21
1
answer

Input mask for CPF in html form (without plugin)

I wanted a simple input mask, just to put 999.999.999-99, dots and the last dash in the cpf field, no verification, no nothing, simple, and no code only plugin, if I am not mistaken have the regrex or something similar, thank you for the attenti...
asked by 11.04.2018 / 16:37
0
answers

How do I access a property of the Event element in Javascript?

I think it's a silly question, but from my beginner knowledge I'm beating a little. I'm building an application in ionic3, this uses typescript, however the plugin I'm working on uses pure javascript. In my console I can display all the properti...
asked by 29.10.2018 / 19:40
1
answer

Jquery beforeunload is called when I click on link

I want to execute a function only when the user closes the browser, however when I click on a link the event is triggered anyway. $(window).bind('beforeunload', function(e) { $.ajax({ url: "php/phpPerfil/brownserClosed.php" });...
asked by 13.08.2015 / 23:12
8
answers

How to format date in javascript?

I want to play the current date in an input, but in the "Brazilian" format dd / mm / yyyy. My code: var data = new Date(); dataFormatada = ????? $("#Data").val(dataFormatada);     
asked by 19.02.2014 / 18:54
1
answer

date_diff returns incorrect difference

I was doing tests with this function, but it returns an incorrect difference, how do I get around this? Example: when compared the difference between 01/01 and 01/03 returns the difference of one month, and only when it is 03/03 to return the...
asked by 26.10.2018 / 19:28