Questions tagged as 'javascript'

3
answers

Detect if a given page is opened within an IFRAME

I wonder if you can detect the following situation: We have an intranet (from a directory) that is loaded through a given address: http: intr.abcdabcd.abc.br We have a global INTRANET, within the first page of the Global intranet, the D...
asked by 25.01.2016 / 17:25
1
answer

How do I disable the browser's back button function?

How to prevent the user from using the back button of the browser with javascript? I have a page and I want it to use the back button.     
asked by 26.02.2016 / 18:36
4
answers

How do I get the value with getElement and assign it to a variable?

I have this code where I'm getting the values correctly from the form (I made a alert with each item and it's getting right). But when saving the variable the sum is not right, when I give alert in sum it appears NaN . Here's...
asked by 17.11.2014 / 11:38
1
answer

How to pass argument to Prototype object with prototype?

With this to do this: function Biscoito(sabor,marca,preco) { this.sabor = sabor; this.rodas = marca; this.preco = preco; this.mostrarAtributos = function(){ return sabor + ", " + marca + ", " + preco; } } va...
asked by 21.12.2014 / 21:39
2
answers

Identify installed extension in google chrome

How can I identify that Google Chrome for the user accessing my site has a certain extension installed. For example, if you have the extension of Glogo.com/Itau, etc. .. I need to check this to display or not a banner for extension installati...
asked by 20.11.2014 / 21:05
3
answers

Use PHP variable in JS file

I want to put PHP code in a JavaScript file, it is not an HTML file. Like for example here: document.getElementById('lbljour').innerHTML = "Jour " + date_today; With the PHP code would it be something like this? document.getElementByI...
asked by 24.10.2014 / 11:29
1
answer

Insert within array whose parent property value is equal to the property value of the child object

I have an object (Questions) and I want another object (Answers) to be added to it according to a common id. var Perguntas = [ { idPergunta: 13, textoPergunta: "Qual seu nome" , Respostas : [] }, { idPergunta: 26, textoPergunta: "Qual...
asked by 06.11.2014 / 20:13
1
answer

How to handle variable filled by Javascript NAN

I have a <input/> in HTML that when I fill up some calculations to automatically fill the other inputs , but if I do not fill in the data this <input/> that triggers the Javascript function the value of the following...
asked by 06.11.2014 / 22:42
3
answers

Adding array in currency javascript

I need some help to convert and add fields formatted as currency coming in this format "1,568,78" I have a code that sums an array of plots and checks if it is equal to the total phallus of the invoice I got here after several queries in user...
asked by 30.11.2015 / 03:27
2
answers

Firefox complains of code after the return

Situation I was performing some maintenance on JS. And a certain function put a return in the middle of it, because the rest was no longer necessary. In seeing the comment on the rest or delete, I kept the code there. When reloading th...
asked by 10.11.2015 / 15:20