Questions tagged as 'javascript'

1
answer

Grab button click on several lines

I need to get all the clicks of a generated html in a select. I have the following structure: <tr class="pesquisar" data-idlocalidade="<?php echo $linha['IDLocalidade']; ?>"> <td class="NomeLocalidade"><?php echo $l...
asked by 20.01.2017 / 18:17
1
answer

JavaScript - Doubt when manipulating values of div's with variables

Good afternoon! Home I am having a question regarding the manipulation of div's values ... When dragging an image of the div fundo1 (blue) or fundo2 (yellow) to div conteudo , I would like the values present within the% div...
asked by 06.10.2017 / 20:25
1
answer

How to join texts in a textbox by dragging them?

I have an empty textbox, and I have some buttons with values like: + , - , * , / , palavra1 , palavra2 so on. I want to fill this textbox by dragging these buttons into it, not just clicking on them,...
asked by 10.10.2017 / 20:15
1
answer

What is the command "res.send ()" in Express?

I am studying NodeJS for academic purposes and during the implementation of a project I came across this command. What is it for?     
asked by 09.10.2017 / 00:42
1
answer

How to save data from an HTML page to a file via Javascript?

I do not know anything about this, and an application came up here in the service where I need to get the data from a HTML page, and generate a TXT , or a PDF >, the save will be on the machine itself, because the server is local. I...
asked by 10.10.2017 / 20:48
1
answer

Promise not returning value

My request is returning this: data: Promise Opening Developer Tools from Chrome I see this: data: Promise __proto__:Promise [[PromiseStatus]]:"resolved" [[PromiseValue]]:"24/01/2016" Using the axios, how can you print this value? L...
asked by 06.10.2017 / 18:48
1
answer

What is the difference between stopPropagation and stopImmediatePropagation?

I realized a while ago that it was possible to use these two functions, but what would be the difference between them? What is the difference between event.stopPropagation() and event.stopImmediatePropagation() in Javascript?  ...
asked by 26.05.2017 / 20:48
1
answer

defining sizes according to the full load, or resize of a page

Well, I'm trying to set a width according to the width of the user's browser screen, however, the console does not point to any errors, but the code also does not run var bannersWidth = document.querySelectorAll(".banner-holder .carousel figur...
asked by 29.05.2017 / 14:48
1
answer

Controller can have private methods?

I have a question and wanted to hear more people's opinions. Following the MVC , can a Controller have private methods? This question came to me because in my context, I have a Controller JS , and my View is an HTML page. Well, if Contro...
asked by 26.05.2017 / 18:48
2
answers

Create dynamic variables in JavaScript

When I'm in PHP and have dynamic variables, ex: nomeVariavel1 , nomeVariavel2 , nomeVariavel3 , I use the following way to put in the bank: $nomeVariavel = ${"nomeVarivavel".$contador} How can I do exactly this in J...
asked by 26.05.2017 / 18:23