Questions tagged as 'javascript'

2
answers

Update array in React

Having the following code, this.state = { valores: ['A', 'B', 'C'] } How could I update an element in this array? Of the type: this.setState({ valores[1]: 'a' })     
asked by 24.11.2016 / 19:27
1
answer

for vs forEach vs. map

Working in JavaScript, I have two arrays that I need to combine to generate a concatenation of all its elements, for example: var array1 = ["A", "B", "C"]; var array2 = ["1", "2", "3"]; resultado = ["A1", "A2", "A3", "B1", "B2", "B3", "C1", "...
asked by 07.10.2016 / 15:12
2
answers

CSS conditional on language

When a CSS stylesheet is included, you can specify the media query directly on the link tag with the condition that must be met for those styles to apply: <link rel="stylesheet" media="(max-width: 480px)" href="moviles.css" />...
asked by 26.09.2016 / 18:41
4
answers

Wait for a for each with ajax requests to finish to continue

I'm doing forEach in a array but this loop has an ajax request inside for each repetition and I need to wait until all the ajax are ready to continue ordering the array that is filled with these requests, this It's my code. var g...
asked by 13.09.2018 / 18:50
2
answers

Validate at least one checkbox does not work

I'm doing a validation code for at least one checkbox in javascript. I relied on this example Since it allows to stop the process until validation is done. I can not get the code to work. function validate(e) { var formular...
asked by 21.09.2016 / 00:46
3
answers

How not to repeat variables with the same name for different functions

I have this javascript code: $().ready(function() { $("#aceptarEditar").click(function(){ var item = $('#idTemp').val(); $("#botones"+item).toggle(); $("#botonesEditar"+item).toggle();...
asked by 02.04.2018 / 20:24
1
answer

Change of id in form

I have a form where I fill in a series of fields of a JPA entity, the case is that between the fields there is a list which I am filling in with a modal, until then everything is correct, in fact I have this method done for several controllers a...
asked by 02.12.2015 / 13:03
2
answers

Go through JSON Object

I have this json: var json = { "0":{ "check":true, "OBJECT_ID":{ "check":false, "name":"OBJECT_ID", }, "nameTable":"TEST1", "EVENT_NAME_MANAGE":{ "check":false, "na...
asked by 27.04.2017 / 11:41
3
answers

Click sharp jquery?

Good, I'm blocked to perform an action with jQuery. I have this: <div> <p> Password: <span id="passwordServer">*********</span> <b><i id="togglePasswordServer" class="unhide icon"></i><...
asked by 07.06.2017 / 19:51
3
answers

Resize iframe based on its content

How can I achieve that if the content increases or decreases in size, does the iframe that contains it adjust? If there is a JQuery plugin, pure JavaScript or a simple solution would be a great contribution since what I can only do is that it...
asked by 05.12.2015 / 13:01