Questions tagged as 'javascript'

1
answer

Sequential execution in Javascript or Angular

I am creating a controller for an AngularJs application, in this controller I will have 3 methods that must be executed in sequence. EXAMPLE: $scope.albums = []; $scope.photos = []; //Metodo que vai setar o array de albums e chamar a funçã...
asked by 25.01.2017 / 13:48
1
answer

How to identify updates on the server with Service Worker?

Is it possible to identify that there was an update on the server, that is, there was an update in the page (HTML) or style (CSS), and make the request to the server to fetch the updated data? If so, how?     
asked by 25.01.2017 / 15:44
1
answer

Inserting duplicate data in Javascript Array (push)

I found a particular problem in a code snippet of which I was developing. Suspicious that the problem might be elsewhere in the project, I decided to create a smaller test environment (with another scenario) to see if the error will persist, to...
asked by 25.01.2017 / 12:12
1
answer

Difficulty to handle a list with JavaScript

I'm having a hard time dealing with a list by javascript would like a tip or help if possible This is the error I'm taking    Array ["AC.FIXA"] sign up: 280: 4   ReferenceError: $ is not defined [Learn More] register: 282: 4   Empty stri...
asked by 07.02.2017 / 12:11
1
answer

Search within a _POST

I was wondering if I can fetch data within a POST? I need a lot, because each box is a different id. Example: **JS:** data {'id':id, 'ponto1':ponto1} **AJAX:** id: $id = isset($_GET['id']); $ponto = isset($_POST['ponto".$id."']);    ...
asked by 04.03.2017 / 01:54
3
answers

Lock event click on element

I have a JS function that displays banners on my page if it is the first access of the day. In that popup there is an input for the person to enter with the email of it, but when clicking on the input, all the pop disappears (in fact this is the...
asked by 06.02.2017 / 14:32
1
answer

Dynamic change in an element when resizing the window

$(document).ready(function(){ var heightJanela = $(window).height() + "px"; $("#banner-hold").css("height",heightJanela); }); I made the above code so that when the document is loaded, the div "banner-hold" gets height eq...
asked by 03.03.2017 / 19:07
1
answer

Send form parameter to the controller via ajax

I have an Index with a form, I need to fill out this form and when I click the Filter button, call the controller using ajax. Index.cshtml @using (Html.BeginForm("ResultadoPesquisa", "RelatorioDesempenhoData", FormMethod.Post)) { @Ht...
asked by 03.03.2017 / 19:05
3
answers

Call javascript function from within a Classic ASP block

How do I perform a javascript function from within a classic asp block. The js function is not in the same file, it is outside, in another file. <% if(MINHA_FUNÇÂO_JS_AQUI) response.write "<img align='middle' width='24' height='24' name=...
asked by 16.01.2017 / 15:45
1
answer

spawn play ENOENT NodeJS

I'm trying to use a library called troubadour : const Troubadour = require('troubadour'); const troubadour = new Troubadour('sox'); app.get('/playmusics', function(req, res){ troubadour.on('start', () => { // Do something here...
asked by 13.01.2017 / 00:25