Questions tagged as 'javascript'

1
answer

How to change state of complex objects in React?

I have the following object: obj = { title: "obj1", tab: [{ title: "titulo da tab 1", card: [{ title: "card1", url: "url", image: "image" }, { title: "card2", url: "url",...
asked by 13.08.2018 / 21:32
1
answer

Is it possible to make a picker color with canvas?

With the addition of canvas to HTML5, various possibilities have arisen, such as creating small games or even a memes generator . With this, I would like to know if through canvas it would be possible to create a color picker....
asked by 13.08.2018 / 19:56
1
answer

Menu that opens when clicking

I'm making my site responsive, and I found a menu that becomes a burger menu depending on the screen size, the way I wanted it. However, the menu opens as you mouse (and probably your finger) on top, and I would like it to open and close if you...
asked by 10.11.2018 / 13:34
1
answer

JavaScript does not work in WordPress

I'm running the following JavaScript code on the site I made in WordPress. var itens = document.querySelectorAll('h1'); console.log(itens); I am pulling from a file that is in the js folder, but it does not bring the items from h1, but if...
asked by 06.11.2018 / 15:59
1
answer

How to start the Chips component of Materialize with default values?

I have a business card app, when the user registers a card has a field of tags that are the key words of the card. He can also edit this card, so you can edit the tags. When he clicks edit, I put all the data in the card already in the fie...
asked by 08.11.2018 / 12:29
1
answer

Problem with JavaScript Old Game

I have a Problem that when the Player 'X' wins appears the Alert normally, but then an alert appears informing that the 'O' player has won as well. I would like to inform only one alert with the winner. var jogador = 'x'; var jogada = 0; func...
asked by 08.08.2018 / 02:37
1
answer

Convert latitude and longitude to GMS (Degrees, minutes and seconds)

I have a project in Javascript Maps that involves a lot of interlinked functions. At the moment, I have 2 inputs text getting Latitude and Longitude of the click of my mouse in the div of the map of Google Maps, in each click it usually receives...
asked by 08.08.2018 / 14:27
1
answer

Pre-populating table with MySQL query

Does not bring what I want, can someone tell me what I'm missing looking at the code? <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Sistema de busca interna com PHP/MySQ...
asked by 17.08.2018 / 14:47
2
answers

Upload image and get its dimensions

When running: var image = new Image(); image.src = "./image.png"; var w = image.width; Is the variable 'w' equal to '0', is there a way to capture the dimensions of the 'image'?     
asked by 16.08.2018 / 02:52
1
answer

Ajax return files from a directory (Asp.net MVC)

I would like to list the files in the form of a link (to click on download). List the directory files below the upload input Ajax:functionCarregaArquivos(Id){$.ajax({url:"/Qualidade/RiscoAcao/ListarArquivos", data: { IdAcao: Id },...
asked by 31.07.2018 / 13:58