Questions tagged as 'javascript'

1
answer

Request blocked cross-origin - PHP [duplicate]

Hello I know there are several questions on this subject, but even reading the answers I still have problems. I've tried to put Access-Control-Allow-Origin in the header of the .php file, I've already tried putting it in the configuration o...
asked by 01.04.2017 / 23:13
1
answer

Return objects added from an array in one

Next, I'm a designer and I'm learning javascript slowly. One of the things that I have the most difficulties, are objects and arrays, so I'm focusing on it now. I have an array with 4 objects as the following code. var players = [{ name: "Ba...
asked by 01.04.2017 / 20:29
0
answers

Fill in email body with cell range Google Spreadsheet

Good evening guys, I'm having a hard time putting a gap between cells like "A3: B18" in the body of the email in this code. The script itself is running smoothly, only this range I do not know how to do. // Envio de e-mail function EnviarEm...
asked by 29.04.2017 / 00:29
3
answers

How to extract specific text from a string via JavaScript

Doubt related to how to remove only part of the text after my tags p: and r: I'm developing an application similar to chatbot simsimi and for testing purposes I'm storing the questions and answers in a var within the script. In...
asked by 29.04.2017 / 04:21
1
answer

Random array array with javascript

Good evening guys, I'm trying to create a map with earth and water in javascript but I want it to be completely random, for this I assigned 0's and 1's in an array and where I had 0 put the ground and where I had 1 put water. Now I wanted to...
asked by 29.04.2017 / 00:14
0
answers

Run existing function by selenium-webdriver's 'executeScript' method

I'm trying to run a function in the browser that is already set, but it is marked as undefined . I ran the following code to reproduce the problem: const webdriver = require("selenium-webdriver") const driver = new webdriver.Builder()...
asked by 28.04.2017 / 23:01
1
answer

Date format

I need to format date to display on the grid, but I do not know the best way to do that. I'm doing it this way: $scope.formato[x].dataFormatada = formatDate($scope.consultas[x].data); function formatDate(date){ var day = date.getDate()...
asked by 29.04.2017 / 02:53
2
answers

Run javascript by counting click to show option on screen?

I have a code that shows fields on the screen according to the click, after the first click it will increment a 'QtdClick' variable, it occurs that I did not want it to show all the fields, I only want when it is 2 second click, 3 click etc., in...
asked by 29.04.2017 / 04:36
1
answer

How to execute a javascript referencing a button ID?

I need to execute a javascript, but I would like to do this using the ID of the button that clicked, Example: $ (document) .ready (function () { $("p").click(function(){ alert("estou usando o P."); }); $('teste').on('click',f...
asked by 29.04.2017 / 03:21
1
answer

Json return error {"isFulfilled": false, "isRejected": false} + Node

I have the following code on the node: var express = require('express'); var app = express(); app.get('/api/events', function(req, res, next) { var events = repositorio.ListAll(); res.json(events);...
asked by 29.04.2017 / 18:12