Questions tagged as 'javascript'

1
answer

How to get the name of a file and store it in an input text?

I have the input file in my form in which I choose the image and its route is shown in my input text, the problem is that it stores the route with * C: \ fakepath * and I all I need is for you to show me the name of the file and its extension....
asked by 10.03.2018 / 20:19
1
answer

Goal score with a bouncing ball

I'm doing a simulator of a bouncing ball and I wanted to add things like a goal and that if you get scoring goal and points. But in the case of the "Red team" it marks two points because the if cycle is done twice, which I do not understand h...
asked by 08.03.2018 / 23:04
1
answer

How to add a new item within an array property in an object?

Hi, I'm trying to use the for in function to find the name of an array-like property that I have inside an object and if there is an item stored inside the property. But the problem is that it is saving the item in all the arrays and what I want...
asked by 15.03.2018 / 23:04
2
answers

Capture a group without capture or group capture with capture

Today answering a question on this site I found myself with a very interesting possible solution, because I accidentally deleted a part of the solution and that solution worked although it did not make sense for me. Without further ado:...
asked by 03.03.2018 / 18:32
1
answer

How do I use the ajax mode of select2 with optgroup and option?

Following the documentation I try the following: var data = { "results": [ { "text": "Life Good", "children": "[{\"id\" : 1, \"text\" : \"Lg Prueba 1\", \"element\" : \"HTMLOptionElement\"}, {\"id\" : 2, \"text\"...
asked by 09.05.2017 / 10:09
1
answer

How to add the amount of a product, if the product is repeated when it is added to an HTML table with JavaScript?

I have a table where I add products with quantity and price, and when a product is repeated, I must add the amount of the product that is in the table plus the quantity of the product that is being added. I have a code that does that to me, but...
asked by 26.05.2017 / 14:28
1
answer

Elements on top of map google maps (Native) Ionic 2

When placing an HTML element on top of the Google Maps using Ionic 2, I can not click on those elements, it's as if the element is not there and the click is on the map.     
asked by 02.03.2017 / 00:53
3
answers

AngularJS returns UNDEFINED to me in the RETURN

It happens that I have this function, which should return me a string in JSON , but it's not like that, it returns me undefined , why? $scope.get = function(id, tabla){ var data; if(id=="") {...
asked by 22.02.2017 / 16:15
2
answers

Bootstrap datetimepicker z-index

I'm opening a datetimepicker in a modal but when I open the picker it stays behind: I have put the z-index property in the css but it does not work for me. <div class="form-group is-empty"> <l...
asked by 15.02.2017 / 05:48
1
answer

Mapping a json in jas

Good afternoon, can someone help me map this json in a javascript ? [{ "header": { "nav" : {"option1":"menu 1"} } }] so that this stays this way <header> <nav> <li></li> </nav&...
asked by 12.01.2017 / 18:20