Questions tagged as 'javascript'

3
answers

How to add object properties in JavaScript?

Assume an object as follows: vendas = { obs1:{ Venda1:{Regiao:"Norte", Valor: 200}, Venda2:{Regiao:"Sul", Valor:100} }, obs2:{ Venda1:{Regiao:"Norte", Valor: 50}, Venda2:{Regiao:"Sul", Valor:20}...
asked by 07.05.2014 / 17:01
3
answers

Smooth animation of element type swing via CSS transform

The concept that is trying to reach is the continuous movement on the axis of the X between a value and its representation in negative: So far, this concept has a failure, the animation is performed from 0 degrees to the value given, but t...
asked by 16.12.2014 / 12:47
1
answer

"Referer" or "Referrer"? Is this a misspelling or is it correct?

Honestly, I have a tremendous doubt right now. I just gave this answer here in stackoverflow: link In this answer, I teach that, to refer to the previous page, we should use the variable $_SERVER['HTTP_REFERER'] . I even did tests...
asked by 14.04.2016 / 22:04
1
answer

Interruption of an asynchronous request

What happens when the user, for example, reloads the page with an asynchronous request in progress? Does the server continue to run the script? And how can I interrupt a request in progress via JS?     
asked by 26.06.2014 / 21:07
2
answers

Convert expiration factor (number of days) from ticket to date dd / mm / yyyy

I have the following digitable line: 74893.12004 21627.007186 37931.981056 7 60750000001400 As I've already seen in this question, I found out how to calculate maturity mathematically: Extract Digitable Line Maturity I need the JS e...
asked by 29.05.2014 / 21:25
3
answers

How to integrate AngularJS with common scripts?

My question started when I tried to use the twitter bootstrap Carousel within an AngularJS project, it did not work at all. I found the angular-ui , I solved my problem using this component, but my doubts are as follows: 1 - For every c...
asked by 03.12.2014 / 17:35
1
answer

Display something when trying to close my site

You can display something (an alert , or popup , an optin grabber newsletter) when the person tries to close my site ? I've seen something similar, that it displays alert() to confirm if the person wanted to leave or stay on the si...
asked by 19.11.2014 / 04:59
1
answer

What is the algorithm for distributing the paragraphs?

I'm reading a specific excerpt from the Bible per week based on a schedule posted on jw.org . I made a javascript script that takes the paragraphs and verses from each chapter and shows the sum of the verses. So I have this entry: (The ex...
asked by 24.11.2015 / 00:17
1
answer

Use local files if CDN is Offline

I would like to know if it is possible to perform a callback if a CDN is offline the system uses the local files. Ex: I use the Fontawesome CDN but if the user runs out of the internet or the CDN goes offline, it is possible to create a callb...
asked by 11.05.2015 / 16:48
2
answers

Use of '@' in variables

I see in some languages that compile for javascript, like TypeScript and CoffeeScript, the use of @ in variables, as well as cases where it is not used. For example: w = 10; @v = 11; In the end, what is the @ and what is the d...
asked by 19.04.2017 / 16:23