Questions tagged as 'javascript'

2
answers

Call an element of an array whose element name is in a variable

Suppose we have the following: in data I have the values title, first names, last name and I have an array with the following elements person [0]. title, person [0] .names, person [0]. lastname I use a for as follows: for...
asked by 10.08.2017 / 21:52
2
answers

Make a loop with ids

I have 7 sections on a page, consisting of a heading panel and a table, the table is shown when the button is clicked to display in the panel-heading. The function to deploy works but I want to use an index so I do not have to do 7 scripts...
asked by 28.06.2017 / 15:00
2
answers

change values when selecting an item in a combobox

I want that when selecting an item in the combobox and pressing the buttons, everything related to the combobox item appears. example : when the select is in Giosvel and the buttons are pressed that my information comes out and when I put in...
asked by 13.06.2017 / 18:30
1
answer

Create an object with a normalized structure

I have a service that returns an object like this: [ {id: 1, name: 'Pedro', city:1, state: 1, country: 1}, {id: 2, name: 'Juan', city:12, state: 2, country: 1}, {id: 3, name: 'Ana', city:10, state: 5, country: 1}, {id: 4, name: 'Diego', city:7...
asked by 08.06.2017 / 20:41
1
answer

Display Firebase data in a table in HTML

That's my firebase db enter the description of the image here <html> <body> <style> table, th, td { border: 1px solid black; border-collapse: collapse; } th, td { padding: 15px; }...
asked by 09.06.2017 / 07:17
1
answer

Cookies to store Javascript values

I would like you to help me with a problem. What I want is to use cookies to store a value this is the code document.cookie="bandera=0;"; $(document).ready(function(){ var lascookies = document.cookie; alert(lascookies); $("#btn2").c...
asked by 08.06.2017 / 14:03
2
answers

Read Json in a for a php query

I am making a request getjson to a table in MySQL by means of PHP . What I need to do is to be able to read the answer with for in javascript to get some data. I have this query in PHP : <?php...
asked by 08.06.2017 / 18:02
1
answer

Placeholder in Javascript - DOM

If we want to report the information that a input field must have in HTML , for example, the attribute "placeholder" should be used <!DOCTYPE html> <html> <body> <form action="/action_page.php">...
asked by 04.06.2017 / 12:15
1
answer

Create DOM with jquery and check existence

I have created a function that performs an ajax query with data return in json, when this function receives the data, it checks if the DOM exists, if it does not exist, it creates it. The question is: When the DOM exists instead of creating i...
asked by 10.06.2017 / 11:11
1
answer

Submit a form by clicking on a link

I have the following problem, I have the following piece of code. <li> <form action="ControladorUsuario" method="POST" id="cerrarSesion"> <input type="hidden" name="uAccion" value="Salir"> <a...
asked by 10.06.2017 / 13:09