Questions tagged as 'javascript'

1
answer

Correct way to declare events in elements generated by DOM

I'm trying to see what would be the best option when dealing with events created by DOM that are not created when loading the JS. Let's say that I have an AJAX request in which your return created elements with DOM. setTimeout(Crear_d...
asked by 18.12.2018 / 00:16
1
answer

How to get a data from a JSON chain!

I would like to ask you for some help! It turns out that I have my html form of MenuItem, where I want to insert data into my DB of the menuitem table where your FK is menu_id of the table menu, the case is that in my DTO I am programmed like th...
asked by 30.10.2018 / 15:00
1
answer

Help - I can not send object of the view towards the controller arrive null attributes

I have a problem I try to send an object in javascript to my controller, the problem is that the controller receives as a list attribute and this list contains another list as an attribute. I think the problem is that I do not send or do n...
asked by 25.10.2018 / 18:58
2
answers

Center in javascript and leave space between lines

What friends do I have these barcodes, but I need the name of the product to be above and the price below in a focused way, I tried with <br> \n and nothing, I would really appreciate your help. This is the code: $...
asked by 26.10.2018 / 23:43
1
answer

How to move an image that I am inserting canvas with the mouse

Could you please help me, what I want to happen is that I can insert an image that is canvas and that image move it with the mouse over a box ... This inserts but when you click on the image, it disappears . THANK YOU !!! document.getEle...
asked by 26.09.2018 / 08:21
1
answer

Bubble sorting in vue.js

good is starting with a small exercise and I decided to make a bubble order with objects and my code is the code is here, but I want to order but I do not know how to help! var app = new Vue ({ el: '.contenedor', data:{...
asked by 18.09.2018 / 01:53
2
answers

Method for does not show images in array

Query, why when showing images with this for method, shows only the array " Collection.push " but I can not display strong> the array " images " with the same method for changing the for parameter (var objects of collection ) for the...
asked by 26.09.2018 / 22:21
1
answer

Duplicate requests

(function(){ $('a').on('click', function(e){ e.preventDefault(); var url = $(this).attr('href'); $.get(url, function(html){ $('.main').empt...
asked by 30.09.2018 / 18:24
2
answers

Remove duplicate elements from an array

Read the question before marking it as repeated, thank you. What I need is that if there are duplicate elements in the array, delete them all. The array is something similar to this: var array = [[1,2], [2,3], // repetido...
asked by 30.09.2018 / 20:07
1
answer

understanding the filter method in javascript

I do not understand what exactly does this [0] in the filter method within the function getUsuario just want to see if you can clarify this doubt. 'use strict' const usuarios = [ {id:1, nombre:'ricardo', profesion_id: 1}, {id:2, nombre:'aleja...
asked by 06.08.2018 / 23:18