Questions tagged as 'return'

1
answer

Working with the result of the return of an ajax request with jquery

I would like to know if it is possible to compare a returned value of an Ajax function with an external variable using jquery. When I try to make the comparison I realize that the external variable is not recognized inside the Ajax function....
asked by 14.11.2017 / 09:24
1
answer

The function returns undefined. What's wrong?

var pulaLinha = function() { document.write("<br>"); } var mostra = function(frase) { document.write(frase); pulaLinha(); } var calculaIMC = function(altura, peso) { var imc = peso / (altura * altura); return; }...
asked by 06.09.2018 / 03:51
4
answers

Perform function when clicking except on specific item with jQuery

I have the following code: $(".teste").click(function() { return false; }); In this div .teste I have links with class .link and I want the return false to occur when I click on the div, but that return false...
asked by 10.07.2015 / 21:52
2
answers

What is the best way to read a SQL error return?

What is the best way to read a sql server error return in a C # web form application? I have the following .. No sql server; END TRY BEGIN CATCH Raiserror('Erro ao gerar os dados', 18, 1); return; END CATCH; No c # SqlCom...
asked by 29.10.2015 / 19:12
1
answer

Returns value of an array dynamically

I have an array $teste = [1,2,3,4]; <Input type="text" value ="teste[0]" /> //retorna "1" How can I get all the array values in the inputs?     
asked by 24.09.2018 / 21:33
3
answers

How do I access the elements of a declared list in a different class?

I've developed code that generates a list when the following input data is entered: Size of the list (or how many " Indexes") The values that will populate the " Indexes ". Values are collected within a method entered in the public...
asked by 03.11.2017 / 22:58
2
answers

What is my error in this code?

Hello, I'm starting to study the JS language and I packed it here, I do not know what my mistake, could someone explain to me what I'm doing wrong? <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title...
asked by 05.08.2017 / 03:47
2
answers

Why is not the recursive function return being used?

What happens when I call a function, recursively, without assigning its return to a variable? Why is it not necessary, in this case, to explicitly assign the mergeSort function to the array variable? public static int[] mergeSort(int[...
asked by 05.12.2015 / 21:34
1
answer

JSONP: status code 200 OK and even then returns $ .Ajax (... error: function () ...)

We're having a hard time making a request $.ajax , JSONP. The problem is that even with positive feedback (Status Code: 200) the function shown below always returns the error-checking result as positive. $(document).ready(function()...
asked by 15.02.2015 / 01:21
2
answers

Php and guzzle, how to do a get to an address and get what to return?

I need to send data by get and get what to return to know if it worked or not, however, with cURL and file_get_contents is not giving (seems to be something of the server that receives the request), hence I'm trying to use Guzzle, I did a test h...
asked by 01.09.2015 / 16:10