Questions tagged as 'javascript'

3
answers

Go through data from a json with javascript

I'm trying to get the data of a json but not when looking for a data throws me the error.    Uncaught TypeError: Can not read property 'day' of undefined $.ajax({ url: url, //dataType: 'json', type: 'POST', jsonpCallback: "myJSON",...
asked by 23.08.2017 / 17:32
2
answers

Obtain individual body tag elements

I have the following code: function obtener(){ var contador = 1; $("body").each(function(){ console.log(contador + " " + $(this).text() + "\n"); console.log("----------------------------------\n"); contad...
asked by 30.07.2017 / 18:32
1
answer

Replace a comma with a comma in single quotes in a string [duplicate]

In a nutshell, what I need is to substitute a comma with a comma with a comma between two single quotes. The result you give me does not include single quotes so far. This is the JS code: var Cadena = "23,54,N21,98,BIT"; var inp...
asked by 31.03.2017 / 14:20
3
answers

Remove elements from an array with "filter" in javascript

I've done the following freeCodeCamp exercise. It involves eliminating elements of a array according to numbers received in parameter. In the call to the function destroyer a array appears and, as second and third paramet...
asked by 08.02.2017 / 13:56
3
answers

Sum of huge numbers

I am practicing my javascript in CodeWars and I have come across this question:    Write a function that returns the String with the sum of two numbers. The parameters are two numbers but of type String . Notes:...
asked by 01.03.2017 / 10:59
3
answers

Ask for names with a prompt and store them in an array in javascript

You are supposed to ask for 3 names with prompt, use an array to store and then display their values. function names() { var nombres = []; var cont; for (int i = 0; i <= 2; i++) { var x = prompt("Ingresa tu nombre:", "")...
asked by 02.11.2016 / 14:52
4
answers

Iterations within a map

I want to iterate over each word, with a for or map but I do not know how to do it I want to iterate the characters of the strings in the for that is inside the map array=["hola","mundo"]; array.map(value=> for(let i=0;...
asked by 13.03.2018 / 22:05
2
answers

Calling Ajax does nothing

I have the following code, but when I click on the "Next" button, nothing happens, I can not find what my error would be. javascript $("#btnSigModif").click(function(){ $.post("../Logica/getdataCargarDatosPreIns.php", {"NroSol":$("#N...
asked by 12.06.2016 / 02:05
3
answers

Is there any way to pass data between links?

I want to make a page of redireccionando.html but I have several links in índex.html and I do not want to have to do redireccionando_link_1.html , redireccionando_link_2.html , etc. Is it possible that I only have to...
asked by 22.12.2016 / 21:27
2
answers

Validate whether a text contains a substring in JavaScript or jQuery

I want to know how I can validate if an input parameter in a JavaScript function contains a substring. I have this: function SweetAlert(Action) { if ($(Action:contains('Create')) == true) { swal('Buen trabajo!', 'se cr...
asked by 21.06.2016 / 15:52