Questions tagged as 'javascript'

2
answers

Error converting Array in Ajax to Array in PHP

I'm having an error while trying to pass an array from ajax to PHP and can not find a solution, based on this statement, but I could not get it to work . HTML: <tr id="<?php echo $produto['idarquivo']; ?>" > <td><i...
asked by 09.03.2017 / 16:22
1
answer

Problem to remove an img tag inside the array by the id of the image

I'm previewing images with image removal. In case I need to remove the selected element from within the array using the id of the img tag. I can already take the id to the function it will remove, however, I can not access the image element by i...
asked by 09.03.2017 / 01:34
1
answer

Close content when you click outside the menu

Good afternoon, I'm making a website that has a side website by clicking on the button the menu comes up on the right side of the screen, and I need it to close when it is clicked anywhere other than the menu so it can close, how can I do this ....
asked by 08.03.2017 / 19:53
2
answers

Error in function for load bar using a while () {}

I am trying to mount a load bar that starts after 2 seconds of loading document , It every 100 milliseconds gets 1% width . However, when the page loads, console.log () shows that the function is running, but nothing happen...
asked by 08.03.2017 / 14:41
1
answer

Access variable from within the scope of the promise

I have a factory that must access two other services. Being the following structure: angular.module('my.module') .factory('ServiceMain', ServiceMain); ServiceMain.$inject = ['ServicePrimary', 'ServiceSecondary']; function ServiceMain(Service...
asked by 04.04.2017 / 15:41
1
answer

Animate function only works in Chrome

Hello I'm doing a little game with javascript, where the program gives a certain time for the player to write a sentence, counts the letters, words and presents on a scoreboard the results on a scoreboard. I added a scrolling effect to when I...
asked by 06.05.2017 / 11:29
1
answer

Problems When passing data via ajax

I have a form where it is validated by jqBootstrapValidation.js, and it is sent to another file, which is the file below: // Contact Form Scripts $(function() { $("#usuariosForm input,#usuariosForm textarea").jqBootstrapValidation({...
asked by 08.05.2017 / 14:36
1
answer

JavaScript function for generic use

I have a simple javascript function that calculates the value of one field multiplied by the value of another and inserts into a third. Below the code: function multiplica() { var quantidade = parseFloat(document.getElementById("tab1quanti...
asked by 05.05.2017 / 23:04
1
answer

onload does not work with setTimeout

I am trying to organize this script according to my need, the thing is that I need the script to load only when the whole page loads and for this we have the onload .. good, but when I enter the onload does not work. .. another question, I'm try...
asked by 28.02.2017 / 20:41
1
answer

Input type="date"

I need to get the value corresponding to the year of a <input type="date"> and subtract from the current date, to display the age of a user (javascript). However, my result always gives "NaN". How do I solve it? And how do I get JS...
asked by 08.05.2017 / 00:50