Questions tagged as 'javascript'

2
answers

How do I navigate this object with javascript or with jquery?

[[{"idParticipante":10,"nombre":"Arnold","sumaCorrectas":4}, {"idParticipante":15,"nombre":"Wozniak","sumaCorrectas":3}, {"idParticipante":16,"nombre":"Connor Mcgregor","sumaCorrectas":2}, {"idParticipante":12,"nombre":"Steve Jobs","sumaCorrectas...
asked by 25.10.2017 / 07:57
2
answers

How to hide a block and show in Angular 4?

Please, I would like to have a input which when I clicked on it, the contents of a div appeared and I had a button that when pressing it, the div disappeared again.   Example <div class="fileContainer"> <input type="file"&g...
asked by 23.03.2018 / 14:14
2
answers

Error trying to find the first letter and the first vowel

I saw another question that I was trying to solve as, of any word, always show the first letter and the first vowel, that is: "mapita" -> ma "astro" -> ao function palabra(w){ var toArray = w.split(""), regex = /aei...
asked by 19.10.2017 / 16:43
1
answer

Place a value plus the variable in an input with javascript

Good what I want to do is that depending on the value that enters the input I put a V- or E-, but does not add when it is E-, or if there is already a V- does not change it. I attach the code. function evaluarContenido(cadenaIngresada){...
asked by 28.03.2018 / 17:52
2
answers

Select field with javascript (no value)

Good to all I would like that when loading a page with its form, a certain text field is selected without having to click on it, this in order to try to avoid using the mouse, I have googled but in everywhere comes the typical document.getElemen...
asked by 26.01.2018 / 16:14
4
answers

validate if all chekboxes are not selected

I have checkboxes and I want the user to select at least one before sending it to the controller. I found several ways to validate if it is selected but I do not know how to do the if, I am sleepy: ( How can I validate if all chekboxes are not...
asked by 06.02.2018 / 20:11
2
answers

Get value of an attribute in jquery when marking it

I have an input such that <input type="checkbox" id="numero-id="' + numeroID + '" /> How do I get the value of numeroID ? I have many input <input type="checkbox" id="numero-id=6" /> <input type="checkbox" id="nume...
asked by 27.04.2018 / 13:06
1
answer

btn.eventListener is not a function!

When I want to add an event listener to an html object, the eventlistener is not a function error appears in the browser console, the code is as follows. This script is executed in a simple html file. var btn = document.getElementsByClassName(...
asked by 28.04.2018 / 23:30
3
answers

Print directly to printer connected via JS or PHP

Imagine that I have a web page and I want to print a receipt for the client, that clicking on a button "Print" of the page gives me the option to choose the printer to print the PICTURE that you see on the screen. Test code: <!DOCT...
asked by 08.01.2018 / 00:02
2
answers

Show the next and previous element in an array

Hi, I have the following code in codepen: link var quotes = [ '“All war is a symptom of man\'s failure as a thinking animal.” ― John Steinbeck', '“Strictly speaking, we do not make decisions, decisions make us.” ― José Saramago',...
asked by 29.12.2017 / 05:08