Most voted "callback" questions
74 questions
Sort by count of
-
0
votes1
answer256
viewsProblems using callback on a Ws
I am implementing integration with a WS which searches the data on the basis of cnpj. When consulting the WS and request a callback, it returns me the following ERROR: Uncaught Syntaxerror:…
-
0
votes2
answers128
viewsGet answer from callback
How do I pick up/use the callback response here? const arr = ["Lucas"]; function minhaCall(sobrenome, indice) { return indice + 1 + ") " + sobrenome + " de Carvalho"; } arr.forEach(minhaCall) For…
-
0
votes1
answer569
viewsExample of Callbacks in c
I would like an example of using callback in c that allows logging callbacks to be called when an event occurs.
-
0
votes1
answer64
viewsCallback Function Return
In a conventional function I can return a value and treat it outside the function: var teste; function funcaoTeste(){ return 'retorno da funcao teste'; } teste = funcaoTeste(); console.log(teste);…
-
0
votes1
answer206
viewsUpdate with Resource Angularjs
There is the method Callback to the resource.update in the AngularJS? Type, var instancia = Resource.get({id:1}, function(data){ instancia.$update({id:idModelo}, modeloAtualizado) }); This works,…
-
0
votes2
answers228
viewsHow to run a callback when a CSS animation is closed?
I saw that the angular-Animate can detect when a CSS transaction is in progress or not to apply certain actions. I need to find out how they do it! Example: #square{ background-color: tomato;…
-
0
votes2
answers412
viewsReact onChange is not firing
I have the following code: handleChange(event, module) { this.state[module][event.target.name] = event.target.value this.forceUpdate(); } render() { const handleChange = (event, module) => {…
-
0
votes2
answers490
viewsCallbacks in Javascript
I’d like to understand something about callbacks! I know there are other topics on the subject, but mine is a simple question and is not clear to me yet. For example, let’s assume I have this array:…
-
0
votes1
answer39
viewsCallback is executed in the parameter
function requestAjax(url, metodo, data, successCallback) { $.ajax({ url: url, type: metodo, contentType: "application/json; charset=utf-8", data: JSON.stringify(data), statusCode: { 200: () => {…
-
0
votes0
answers126
viewsTreat callback json from ERP Bling in Laravel
I’m having trouble treating the following json return from ERP Bling on Laravel: array ( 'data' =>…
-
0
votes0
answers51
viewsIndefinite Variable / Callback in javascript Accountaddress
I am facing a problem in my project: Ultimately it is as follows: My local variable is not being set even if it is set. is Callback problem, how can I solve? I’ll explain the situation further…
-
0
votes1
answer269
viewsHow do functions that receive callbacks be executed in a specific order?
Let’s analyze the code snippet below, in Javascript: function rand(min = 1000, max = 4000){ return Math.floor(Math.random() * (max - min) + min) } function f1(callback){ setTimeout(function(){…
-
0
votes1
answer48
viewsHow does a script work on a web page?
I created a page with three divs that direct to videos according to their title, when clicking on each of them, a modal is opened with the respective video of div. This is the HTML: <body>…
-
0
votes1
answer126
viewsHow to update Input using Modal Confirm Multiple Times
I need to confirm some fields separately. It happens that it overwrites the text, does not wait for confirmation and only appears at the end of the last call and the confirmation of this, replicates…
-
0
votes0
answers30
viewsUpdate status without creating widget directly - Flutter
I have in my main.Art a Bottomnavigationbar that should always be visible. Some screens cannot be accessed by Bottomnavigationbar icons. Main.Dart vvvvv void main() async { await _storage.ready;…
-
0
votes1
answer36
viewsAPI Olist - access blocked by CORS policy
I need to use the Olist API, through a callback, but I’m getting error when performing the POST request that would return the access_token. The flow would be: Use callback/getlink to send client_id…
-
-1
votes1
answer180
viewsGrocery CRUD Callback
I need to set a message to the user, after validating a callback function, however, I do not enter anything related. It has a generic message that serves for the whole form, I want to by fields. I…
-
-1
votes2
answers145
viewsWhy use three parameters for this`callback`function?
I’m learning Javascript, and I was recreating the type function forEach (wearing a bow tie for) inside prototype of a array. And for that I used a function callback, down below:…
-
-1
votes1
answer152
viewsCallback in anonymous function returns Undefined
I need to create two functions. One of them where I will make a request in Javascript to pick up a Bearer Token, and the second, I will use the token to call another function. However, I’m not…
-
-1
votes1
answer43
viewsReuse mysql connection function where
Hello! Analyzing my source code I realized that within the project there is a part that repeats many times. I would like to reuse repetitive code in my mysql project const pool =…
-
-1
votes1
answer45
viewsPromise - Read Javascript File
Good Morning, I’m a beginner in Javascript I’m having difficulty using Promise to read.txt file using Fs.readFile. Detail I’m only using ". js" I did a callback all right with him but it turned into…
-
-3
votes1
answer283
viewsHow to determine the order of executing callbacks functions without resorting to anonymous functions and how does the stack of executing functions in JS work?
Analyzing the code below: function rand(min = 1000, max = 3000){ return Math.floor(Math.random() * (max - min) + min) } function f1(callback){ setTimeout(function(){ console.log('f1') if(callback)…
-
-4
votes3
answers116
viewsHow to return the value of a file outside its scope
[I hate javascript/typescript] Here’s the thing, I have a problem where I need to get the result of a file with Axios and return to a function in React. Is there any way to do that ? I want to…
-
-4
votes1
answer34
viewsWait for a run function to perform the next
I’m making a script in JS but I’m having a little difficulty. I wanted to make my Loop() function be called again only when my Fatown() function has already been fully executed, today when I run…