Questions tagged as 'javascript'

2
answers

Merge two arrays of objects in javascript

I wanted to know how I can merge two% co_of% of objects * (inserting one into another would also help me). * For example: array["nombre": "paco", "edad": "21"]; array2["nombre": "matias", "edad": "25"]; would look like this: arraydefin...
asked by 22.02.2018 / 01:04
4
answers

Remove data in a vacuum

I would like to remove gaps and blank spaces in an array that I get from google sheet and print in this way: var prueba = ['NOV-DIC 17','ENE-FEB 18','MAR-ABR 18','MAY-JUN 18','JUL-AGO 18','SEP-OCT 18','NOV-DIC 18',' ',' ','','']; As you...
asked by 26.02.2018 / 19:38
3
answers

event to control the doubleClick

I have managed to perform a function in the first click function s(){ $('div').addClass('s'); $('div').css({display:"block"}); console.log("click"); } <script src="https://ajax.googleapis.com/aja...
asked by 05.03.2018 / 01:18
2
answers

remove the number of elements of the class from a label with javascript?

I wanted to know how I can get the number of elements in JavaScript which function should I use I was looking for but I did not find it. Code example: var parentDOM = document.getElementById("parent-id"); var test=parentDOM.get...
asked by 12.02.2018 / 16:01
3
answers

JavaScript 1e16 * Math.random () equivalent to PHP

I have this line of code that when executed in the console generates random numbers of 16 characters: 1e16 * Math.random() When executing you can give this kind of results: 1e16 * Math.random() //8988522134496624 As you can see, it gen...
asked by 25.11.2018 / 23:50
1
answer

Accept letters and numbers in a text type input

Good morning, I have this code that only allows the use of numbers. $('input[name="39"]').bind('keypress', function(e){ var keyCode = (e.which)?e.which:event.keyCode return !(keyCode>31 && (keyCode<48 || keyCode&g...
asked by 03.12.2018 / 22:10
1
answer

e.preventdefault does not work in submit

I have a simple form with two inputs and a button to send it. I am trying to make the submit not work by default to be able to do things with the data before sending it to the server but, I do not know why, I can not avoid the submit....
asked by 16.04.2018 / 15:03
1
answer

Menu with boostrap

I'm creating a drop-down menu and it does not show me, I do not know why, look here the code: Default.ctp <?php /** * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) * Copyright (c) Cake Software Foundation, Inc. (https...
asked by 09.04.2018 / 21:07
1
answer

Problem with angular ng-repeat directive

I have a problem with Angular's ng-repeat directive, I'm creating a banner component that works as follows: when you click on add image, that image is converted to base64 and the new image is added to an array and it is with this array that the...
asked by 05.09.2017 / 16:43
2
answers

Enter data in an HTML table using JavaScript jQuery

Hi, I am new to HTML and I need to perform the following exercise: given the following code, I need to implement javascript to be able to add the data to the table. Also, when you add one, you can delete it. Finally, you must count the number of...
asked by 06.09.2017 / 21:59