Questions tagged as 'javascript'

3
answers

How to use the current value of a variable in an inner function?

The following code "prints" 50 times the text "Message 50" in a textarea . for (var i = 0; i < 50; i++) { setTimeout(function() { textArea.value += 'Mensagem ' + i + '\n'; textArea.scrollTop = textArea.scrollHeig...
asked by 27.12.2013 / 14:47
0
answers

Popup.html interacts with the document?

I'm new to extensions for Chrome and would like to do an Extension with the popup that contains some buttons that fill text fields of the page loaded in the active Tab. At the moment, I was able to make only the extension button itself complete...
asked by 01.06.2017 / 17:18
1
answer

Return values from module.exports by return

I have the following code that the data is returning right by console.log() var request = require("request"); var myJSON = require("JSON"); function resultado(url, callback) { request({ url: url, json: true }, f...
asked by 01.06.2017 / 18:41
1
answer

solve programming

I need help on the lines below where video and image appear when I type the photo var nota = document.getElementById("text").value; function limparimg() { document.getElementById("div").innerHTML = ""; } function limparvid() {...
asked by 03.06.2017 / 22:30
0
answers

How to enable cross-origin in tomcat?

I basically need to enable Cross-Origin in my Tomcat 8.5. I want to know the right way to do this and what are the risks?     
asked by 02.06.2017 / 22:45
0
answers

Doubt in a jquery with div print

Next question, I have a javascript code that makes it impression of a div by id, but the following is a form, I would like to customize with header and images, it is possible without me having to insert the data into the div ? La goes the scr...
asked by 19.06.2017 / 23:21
2
answers

Validate form inputs with regular expressions

I have contacts field in the page where the user must fill in, for example, the name, he should just type letters, in the phone field, just numbers and email required to use the "@". The idea is to display a message to the user when they enter n...
asked by 20.06.2017 / 06:09
1
answer

File Upload with JS

First of all I wanted to say that I read some posts about it right here in the stack, but I could not get it to work, so I decided to post my code. My idea seems to be very simple, I need to upload a xlxs file to a server folder for it to r...
asked by 17.06.2017 / 19:37
0
answers

Firebase Notification with Javascript

Greetings! Well, I'm developing a Firebase-based project that uses many functions from it, such as Firebase Realtime Database to save data and reference them when needed, Firebase Authentication to login, and even Firebase Hosting for hosting si...
asked by 20.06.2017 / 04:03
0
answers

The Map (google maps API - javascript) stops working when I add a function in the script!

The map to appear when I put the AllLink function, when I remove it the map will appear again as always var map; var markers = []; function initMap() { map = new google.maps.Map(document.getElementById('map'), { center: {lat: 7...
asked by 25.06.2017 / 02:58