Questions tagged as 'javascript'

3
answers

Function js run at a certain time

Sirs, I have a question, is there any method that for example executes at a certain time? I would like when it was 0h the page would update automatically, so I would save some cookie to inform that day has already been updated ..     
asked by 06.07.2017 / 13:21
1
answer

Insert an element into an array that contains an object

Hello, I would like to know how to insert an element into an object in an array, in this case, when I add it with the code below, the element is inserted as another index: this.array = []; this.array.push(email); this.array.push({ Mensagem:...
asked by 29.06.2017 / 23:44
1
answer

Problem with window.location

I'm having problems with window.location = "index.php" , it's not redirecting from page login.php to index.php , see code: <script type="text/javascript"> $(function() { $("#loginForm").on("submit", function(a) {...
asked by 30.06.2017 / 23:02
1
answer

Problems with insertion into an array

vm.categorias = function () { ConectaVagas('get', 'categorias').then(function (val) { vm.categorias = val; for (var a = 0; a < vm.categorias.length; a++) { console.log(a); // Aqui retorna 0,1,2,3 ( Número de cat...
asked by 03.07.2017 / 09:12
4
answers

Add a sequence of numbers

I'm trying to make an algorithm here with this statement:    Given an integer n, n> 0, and a sequence with n integers, determine the sum of the positive integers of the sequence. For example, for the sequence 6-27 0 -5 2 4 your program should...
asked by 21.06.2017 / 21:39
2
answers

How to read Console strings?

I am trying to make a code that reads a string from the Console of the browser and assigns the value of the string in the id "txtTextoResposta" . To make it more illustrated, I want to do similar to C # , when we do this: stri...
asked by 08.07.2017 / 22:55
2
answers

Get TD value when clicking table

I have a table HTML horizontal, where I want to get the value of TD (time) when clicking on the line. Here's an image to try to illustrate better. Byclickingonthe07:00hourlineforexample,openamodaltoregistertheeventatthetimeyouc...
asked by 10.07.2017 / 01:35
1
answer

Processing status in Ajax calls (jquery)

I have an application that communicates with the server using ajax calls with jquery. However, in some cases, the time for callback ends up being too long. I would like to know if there is a possibility of receiving information with the requisit...
asked by 25.07.2017 / 22:55
3
answers

Store value of an attribute in a variable in jquery

I have this following menu : <li><a id="#nav" href="#"><i class="a glyphicon glyphicon-home"> </i><span>Inicial</span></a> </li> <li><a id="#nav" href="#"><i class="b glyphico...
asked by 25.10.2017 / 21:27
1
answer

Is not function JQUERY

$(".add").click(function(event){ save($(this).parent().attr("id")); }); function save(docName){ var inputs = $('#' + docName + ' input'); var selects = $('#' + docName + ' select'); var obj; console.log(inputs); for (let i = 0; i <...
asked by 16.05.2017 / 01:58