Questions tagged as 'javascript'

3
answers

Length of an array in JavaScript

I have to do the following exercise:    Extend the given class to implement a count () function that prints the number of elements contained in the "value" property in the console. (Do not modify the given constructor)       Instance the cla...
asked by 03.07.2017 / 20:37
2
answers

How to change the value appearing in rows without deleting the previous content in javascript?

I have a series of buttons with a class called botonesSistema I would like that when executing any function, they will change their class to another call EstadoSistemaEncendido . Try as follows: var elements = document.getEl...
asked by 23.05.2017 / 21:19
3
answers

Get the value of a drop-down (select) with JQuery

I have this HTML code to create a combobox from an enumerated Enumerated public enum tipoFormasPago { [Display(Name = "Efectivo")] E, [Display(Name = "Tarjeta")] T, [Display(Name = "Paypal")] P } HTML code &...
asked by 26.05.2017 / 13:32
4
answers

parent children from the second tr

How can I use the following code to change the ids from the second tr or omit the first tr, since the table has an initial tr that shows the names of the columns which do not handle data. parent.children("tbody").children("tr").each(function(e...
asked by 19.01.2018 / 15:21
3
answers

Allow only input of an input type="number"

Search by tutos and I did not find anything, someone went through this? <div class="row"> <div class="col-md-2"> Valor:<br /> <input type="number" class="form-control" id="txtvalor" value="0" Placeholde...
asked by 11.01.2018 / 21:13
3
answers

replace text in an array with the map function

I do not understand why I can not replace the text but I can show it <p id="poesia"> LA SCARPETTA Mi sa che ieri sera eri di fretta guarda che ti sei persa la scarpetta. io stamattina l’ho trovata con la ca...
asked by 27.04.2017 / 23:13
2
answers

What does the reduction parameters mean?

I want to find the minimum sum of an arrangement that is to say of this arrangement [5,4,2,3] the minimum sum is 22. my solution is: function minSum(arr) { arr = Object.values(arr).sort((a, b) => a - b); var j = arr.leng...
asked by 12.01.2018 / 15:36
3
answers

That a button has to double click to make the form post?

It all arises that a user may be wrong to write a text in the input then I want to make the form post only when the user double-clicks the button.     
asked by 04.04.2017 / 19:57
3
answers

How can I delete the text inside a div that contains other drag-n-drop divs?

I have a div which contains a "text" that says "Drag the items here" I would like to delete them when the container has 1 or more than one div internal%. function dragstart(caja, event) { // el elemento a arrastrar //consol...
asked by 30.03.2017 / 23:09
2
answers

How to pass two parameters to a controller via ajax

I'm working on an ASP Mvc project, I have the following controller: [HttpPost] public ActionResult Asociar(int? id, int proveedorId) { return PartialView("Companies"); } In my view I pass these parameters in the following way: <a...
asked by 01.05.2016 / 06:09