Questions tagged as 'javascript'

3
answers

failed to install JSPM (node JS)

I try to install JSPM with these commands link but I have an error trying to try it with the command      npm install jspm -g and I get an error Please update to minimatch 3.0.2 or higher but I check the version of the minimatch and it's 3...
asked by 15.09.2016 / 16:50
3
answers

Can not convert undefined or null to object in Javascript

I am comparing an arrangement that comes to me from a query in the following way: var data = response['return']; // Aquí se almacena el arreglo var tableHead = '<tr>'; //Aquí comparo el arreglo para validar si esta vacío o indefinido o n...
asked by 19.07.2016 / 16:23
3
answers

does not show JQuery autocomplete matches

I'm using Jquery's autocomplete library, I think it works 50%, it does not generate an error but it does not show me the text of the matches it finds, they only appear as the rows where the text should go, not I know why ? this is my code...
asked by 15.11.2016 / 18:06
3
answers

How can I send a JSON object to a PHP?

I want to send a JSON string from Javascript to PHP, and then in PHP do a json_decode, but one thing fails me. function request(data) { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (xhttp.re...
asked by 13.07.2016 / 09:08
1
answer

What is the function of refs in React?

I am learning React would like to know the definition or what is its use of refs, I have this function within a submit, what value does it get from refs? onSubmit(e) { e.preventDefault(); let email = this.refs.email.value.trim();...
asked by 17.08.2017 / 13:48
2
answers

validate text box so that first character is a letter [closed]

I have a php form for a user record, and I'm validating the input type text with javascript Is there a function in javascript that makes the first character to be entered in a text box be a letter? for now I have validation to text boxes only...
asked by 17.08.2017 / 14:16
3
answers

Bug in prototype of number Javascript

Number.prototype.sq = (n) => return Math.sqrt(this); var b = sq(5); console.log(b); The idea of my code is to return the square root of this, but it throws an error, why?     
asked by 08.08.2017 / 17:49
3
answers

how to save a jquery action in the localstorage?

It happens that I have a button that when I click on it, it changes the background to another color and I would like it to be saved in localStorage . So, every time you enter the web, be the color you chose. Let me explain: function tema...
asked by 21.08.2016 / 19:59
2
answers

What does the math.floor () function JS

Someone can explain to me the following code, especially the part of the operation with Math.floor () and why it is divided dif / (1000 * 24 * 60 * 60) var fecha1 = "12/06/2008"; var dia1 = fecha1.substr(0, 2); var mes1 = fecha1.substr...
asked by 24.08.2016 / 16:27
1
answer

Go through a table with different inputs and print them in another

I have been having difficulties planning the logic for this problem. I have a table with various types of input ( text, date, checklist ) and I want to print them in the order given by the first table, but I have problems when I select...
asked by 14.12.2018 / 22:39