All Questions

3
answers

Loop do while javascript

I wanted to know if someone could help me, I'm doing an exercise in javascript in which I collect cookies I leave the code: window.onload = function(){ var contador = 0; do{ contador=contador+1;...
asked on 28.04.2017 / 02:12
2
answers

A javascript script does not work for me

I have the following code, the part of css and html5 works very well, but I can not know why the script is not executed, from the button I call the function verificación(); through the event onclick , but when y...
asked on 06.05.2017 / 02:00
2
answers

Map within another Map

I'm trying to access a map that is contained in another map , but I get an error. The code is as follows: map<string, map<string, list<string>>>::iterator iter; map<string, list<string>>::iterator...
asked on 06.06.2017 / 15:30
1
answer

String stored inside an array becomes undefined in JavaScript

I have some text strings stored in an array and I want to use them to add a CSS property to a series of images. var img = document.getElementsByClassName("post-image"); var link, w, h; var margenes = []; for (var i = 0; i < img.length; i...
asked on 18.05.2017 / 02:05
3
answers

Remove a text at the end of each paragraph - jQuery

I want to remove a text at the end of each paragraph. Dispongo del 1ero boton: anadir (añade un texto al final de cada parrafo) --> OK Dispongo del 2ndo boton: quitar (quita el texto al final de cada parrafo) --> ¿? What would be the...
asked on 09.05.2017 / 13:50
2
answers

How to display a message with Toast within a Thread in Android Studio?

It turns out that when I want to show a message through Toast and send it the context I get an error, I do it like this: public void mostrarMascotas(){ new Thread(new Runnable() { @Override public void run() {...
asked on 24.04.2017 / 20:18
2
answers

Change the style of a DIV when it is pressed

I have a problem with a hybrid mobile application. I would like to change the style of a div when it is clicked. I currently have something like: <div id="foo"> Lorem ipsum dolor... </div> and I apply in my document css:...
asked on 20.04.2017 / 20:39
2
answers

Data step of a multi-select in the selected order

I have a% multiple% co with Chosen and I need to pass the data on how they have been selected; but the moment I pass them, it passes them to me in the way they are sorted in <select> . For example, I select products 2, Cookies,...
asked on 20.03.2017 / 04:24
2
answers

Error when obtaining the value of a variable

I have a problem with obtaining the data of a variable, It happens that I am doing a function that at the end of accounts must sumar of one on the initial value of the variable "n" , but I only get it to show by screen the initial v...
asked on 23.04.2017 / 02:05
2
answers

Display PDO query data in JSON format

I try to get the data from a query and print it on the screen but it does not show anything. $pdo=new PDO("mysql:dbname=usuario;host=localhost","root","root"); $statement=$pdo->prepare("SELECT * FROM usuario WHERE estado = 1 ORDER BY idusua...
asked on 02.03.2017 / 02:04