Questions tagged as 'javascript'

1
answer

How to display PHP data in ajax?

I am trying to load the PHP data on the page when it finishes loading, but it does not show me the data, here is a simple example: <?php $datos = new stdClass(); $datos->mensaje = "hola"; header('Content-type: application/json;...
asked by 28.07.2018 / 03:27
1
answer

Problem with php AJAX accents PHP MYSQL using PDO

I can not receive the JSON from the php because the data has an accent I leave the code: PHP: <?php $pdo=new PDO("mysql:dbname=salas;host=127.0.0.1","root",""); $statement=$pdo->prepare("SELECT * FROM departamentos"); $statement->e...
asked by 01.06.2018 / 11:25
4
answers

Functions onclick on a href - PHP - Javascript

I have the following code in a form, it belongs to a column of a table with data collected from a MySQL database. echo "<td width=\"08%\" id=\"estado".$row['ID_OBLIGATORIO']."\">" ?> <!-- Columna ESTADO del usuario. --> <...
asked by 16.11.2016 / 12:57
1
answer

Generate Array with multiple objects

I am trying to generate an Array with structure of objects inside with the following structure: var valores = [{ name: 'MongoDB', type: 'float', value: 25,{ name: 'MongoDB', type: 'float', value: 5 },{ name: 'MongoDB', type: 'float', value: 2...
asked by 23.04.2018 / 13:38
2
answers

Because I do not calculate the rest of the inputs

I have a table and I am calculating the difference of hours but only calculates the first row of the table Here is my javascript code <script> //Creamos variables para recorrer fechas y agrupar total x día var afecha = new Array(...
asked by 29.06.2018 / 15:47
3
answers

Show or hide items depending on two radio buttons

I have managed to show a div according to the response of a radio button , but how can I do to show the same div but with the combination of two radio button ? I share my code: function mostrar(dato) { if (dato == "...
asked by 03.07.2018 / 14:43
3
answers

Problem with reacts and setState (asynchronous)

I have a problem with react js and with setState in the documentation it says it is asynchronous. And the problem I have is that I am using a Select and depending on the value that I select, it makes the request with ajax to the database but sin...
asked by 29.12.2016 / 05:48
3
answers

Can this value be obtained?

Good day, I'm working with a calendar that is generated with Jquery then generates a table that brings a few years. I attach an image of how it looks: The table is generated dynamically, creating this code: <div id="calendar"> <...
asked by 13.04.2018 / 17:52
2
answers

Browse a json in Javascript with jQuery

I have a json like this result= {"cambios":[{"idCard":"5ac8798039a4cff62f780f8e","idList":"5ab7c3aec0fa3a36a67b1c87"},{"idCard":"5ab7c3cc83270bcf19c2774f","idList":"5ab7c3aec0fa3a36a67b1c87"}]} I want to access idCard and idList, I am testi...
asked by 15.04.2018 / 13:27
1
answer

Timer javascript speeds up with every restart

I have this countdown code: var tiempoTotalFinal = 63; var Temporizador = tiempoTotalFinal; var TiempoSesion=setInterval(CuentaAtras, 1000); //1000 will run it every 1 second function CuentaAtras() { Temporizador=Temporizador-1;...
asked by 13.04.2018 / 18:47