Questions tagged as 'javascript'

2
answers

I can not work with localStorage

I have the following javascript code: const player1 = "X"; const player2 = "O"; var playTime = player1; var gameOver = false; var pontuacaoX = 0; var pontuacaoO = 0; var chaveX = 'scoreX'; var chaveO = 'scoreO'; var valAcumuladoX = 0; atualiz...
asked by 22.08.2018 / 19:29
1
answer

Cloning textarea values

How to clone the values of textarea so that when typing in textarea 1 the textarea 2 receives this value and when typing in textarea 2 the textarea 1 receives the value? I've tried document.getElementById("t...
asked by 23.08.2018 / 07:47
0
answers

How to repeat equal data using data.map

I'm using the d3.js library and wanted it to read equal data, not overwrite the scales. Here is the code snippet that does this, and an example of my .json file: const months = data.map(function(d) { //console.log(d.month);...
asked by 18.09.2018 / 16:29
1
answer

How to include JSON file inside a .JS

I've already searched the forum here, I've got examples ready on other sites, but none of them worked for me. As I said in the title, I am not able to make a link from a .json file into the .js file. This is my file script...
asked by 21.08.2018 / 02:10
0
answers

Canvas draw grid as backgound

I searched, but did not find much information. What I want to do is draw a grid as a background on the canvas. I saw some examples with svg and others directly on canvas. Assuming I'll be able to zoom in and drag the canvas scenery among other i...
asked by 22.08.2018 / 01:49
3
answers

Refresh only once

I'm building a website and need a strength. The problem is this: I need to enter the same as a refresh , just when I enter it I tried the code: <meta http-equiv="refresh" content="1"> However, it gets in looping inf...
asked by 28.09.2018 / 19:45
0
answers

How to release scrolling in Safari 11.1?

I needed to do this so that the content is not being shaken and swipe with the finger, but now the scrolling of the page has stopped working, how do I release the bearing? document.addEventListener('touchmove', function(e) { e.preventDefau...
asked by 13.09.2018 / 22:59
0
answers

Laravel + Passport + Vue - Not found

Gentlemen, I'm starting to develop an application using Laravel's Passport method, but it is not finding the VUE library. follows an image with the return of the browser: jsfileimportingVUElibrary readablebladefile Where can I be wrong?...
asked by 19.09.2018 / 21:17
2
answers

How to use AJAX in an iframe?

To contextualize: I'm trying to make only a part of my HTML page updated every 5 seconds. For this, I'm using AJAX. In the middle of development, I encountered a problem of not being able to return the object and my view at the same time, s...
asked by 14.08.2018 / 18:28
1
answer

Picking data from a selected row of a dynamic table

I have a table, which I include the data dynamically in a table. I include in this way, I include in the first column the checkboxes: $("#tablepesquisaprodutos").append("<tr class='item'>" + "<td>" + "<input...
asked by 31.08.2018 / 17:39