Questions tagged as 'javascript'

2
answers

How to modify the HTML document through an extension?

I would like to make a button appear on the site that I have developed, but only for those who have the extension. I have the CSS, HTML and Javascript codes to generate the button. Button functionality is ready, I just need to do the extensio...
asked by 06.07.2015 / 13:45
2
answers

Monitor PHP script processing

Does anyone know a way to monitor PHP code processing and display on the client? I'm designing a layout converter that takes data files in a certain format and converts them to another format. Basically, I would like to present to the us...
asked by 26.06.2015 / 16:49
2
answers

jQuery - Use two functions together

I need the same method to be called in two events, that is, in the page load load the data, and if the value of the input is changed load the code again. ($("#cpf_cnpj").load(function() or $("#cpf_cnpj").focusout(function()) { codigo }...
asked by 23.06.2015 / 19:12
1
answer

Increase opacity of an element

My fadeOut is ok, but fadeIn is not working ... function fadeIn(elem, speed) { if(!elem.style.opacity) { elem.style.opacity = 0; } InInterval(function(){ elem.style.opacity += 0.03; }, speed /100); }     
asked by 28.05.2016 / 15:13
1
answer

Access values within an array from the index

I have a x variable with the following content inside: x = [ { id: '1', name: 'name, } ] And I thought that to access id was x.id , but it is not so. How to access?     
asked by 22.05.2016 / 20:24
1
answer

AngularJS - What is the best practice when uploading images?

I've implemented this solution to upload the images: MaquinaResource.save($scope.maquina, function (data, responseHeaders) { var formDataImage = new FormData(); for(var i = 0 ; i < $scope.images.length; i++) { formDataImage.ap...
asked by 21.06.2016 / 15:36
1
answer

Enable CORS via JavaScript (Phonegap)

I'm creating a Phonegap application that consumes a Web Service (Web Service) API, and I need to access an external domain. Searching through the web I found that I had to enable CORS via JavaScript to be able to access other domains. In this wa...
asked by 24.02.2015 / 20:41
1
answer

How to put a text cursor to start on the right? Calculator

I'm doing a basic calculator and in the calculations screen, I want the numbers to be "printed" from right to left. How can I do this?     
asked by 31.03.2015 / 03:14
1
answer

What is the use of hoisting in JavaScript?

Before ES6, all variables in a function were created independently of JS scope. That is: if(false) { var mensagem = "Olá!"; // declaração + atribuição } console.log(mensagem); => undefined Return is not something like a reference error...
asked by 26.02.2018 / 01:14
2
answers

How does hoisting work on ES6?

For example, using var , when calling the function below this way: function funcao(){ console.log(foo); var foo = "mensagem"; } funcao(); It will return undefined because of hoisting , which moves the variable foo...
asked by 27.02.2018 / 14:06