Questions tagged as 'javascript'

1
answer

How to move element in a straight line towards the coordinate?

I can move an element in the direction of the coordinate successfully. However, for what I need, it needs to move in a straight line (which is the shortest possible distance between two points). In the example I gave below (which represents t...
asked by 10.07.2018 / 20:04
1
answer

How to Detect if User Uses AdBlock and Make a Decision Based on Response? [closed]

I have a problem with Ebit Banner When the user has some Adblocker installed it gets looped and overloads the browser because the page does not stop reloading and hangs I want to identify if the person has Adblock and, if so, neither load th...
asked by 03.01.2018 / 16:18
1
answer

Change Javascript string characters to successors

I have a string, for example, acbd and I want to get another string bdce , formed by the successors of each character. In my searches, find a possible way to transform the string into an array and then iterate it to get a new string....
asked by 05.01.2018 / 19:43
2
answers

Set loading time for loading

I have the following code that I use to send form data to the PHP file. function loginRequest() { // Declaração de Variáveis var usuario = document.getElementById("txtusuario").value; var senha = document.getElementById("txtsenha").val...
asked by 30.12.2017 / 00:55
1
answer

How to solve: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'

I have a problem with an application using ES6. I am creating a table that receives values from a form, but every time I click the button to send the information to the table, it gives the following error.    Failed to execute 'appendChild' o...
asked by 29.12.2017 / 19:29
1
answer

swap pseudo: after with jquery [duplicate]

How can I change the style of a class: after using jquery? I tried this way but it did not work: HTML: <div class="box"></div> Jquery: $('.box:after').css({ borderColor:' #c12 transparent transparent transparent' }...
asked by 04.04.2018 / 23:01
2
answers

Javascript only works after two clicks

I'm using a side menu on a website and wanted it retracted with a click of the button ... it just happens after two clicks !! function resp() { var clique = document.getElementById("btn-menu"); var menuLateral = document.getElementById...
asked by 01.01.2018 / 00:22
1
answer

PHP or JS - Hide Name with more than X careteres

Using the phrase "OLA SOU FIXE LALALA" How can I just show half, for example "OLA SOU F..."     
asked by 31.03.2018 / 17:58
1
answer

Converting boolean to YES or NO in Angles

I have the following table structure on my form HTML : <tbody> <tr nr-repeat="p in model.previdencias"> <td>{{p.NomeDependente}}</td> <td>{{p.IsAtivo}}</td> </tr> </tbo...
asked by 13.12.2017 / 01:48
1
answer

Event with and without addEventlistener are not the same?

Because this does not work: window.addEventListener('beforeunload', function(){ return 'wait a minute' }) And this works: window.onbeforeunload = function(){ return 'wait a minute' } Are not they the same thing?     
asked by 16.12.2017 / 19:50