Questions tagged as 'javascript'

2
answers

Change logo when scrolling

I am currently doing a web and the CMS e-commerce with which I am handling the content is Prestashop but I have run into the following problem: We have a menu: X 1 2 3 4 , where X is the logo and the numbers...
asked by 16.02.2017 / 05:10
2
answers

Help with Google Static Maps API

Hello, I am developing a website in which I have a form and ask for details of the address. I want to implement that API as a reference and the problem comes from implementing google maps. How do I capture the long. and lat. put the user and the...
asked by 18.05.2016 / 21:26
2
answers

Problem with $ .getJSON.then ()

I do a data extraction with $ .getJSON () without problems, I get what I want from my database and then I work with .then but in this line getKeys().then(data => data.map(key => keys.push(key))); that I keep in my variable 'keys' whic...
asked by 15.03.2017 / 20:24
1
answer

Group and concatenate columns of more than one row in a Javascript, such as STUFF in SQL

//VALORES ACTUALES {Posicion: 0, Texto: "M1", Elemento: "Cr", Rango: "1.00-1.50"} {Posicion: 0, Texto: "M1", Elemento: "Mo", Rango: "0.30-0.65"} {Posicion: 1, Texto: "M2", Elemento: "Cr", Rango: "1.23-1.50"} {Posicion: 1, Texto: "M2", Element...
asked by 25.09.2018 / 00:24
4
answers

Access a property of an object from a string array

I have a object like this: { var: { foo: '', foo2: '', } } and a parameter (['var', 'foo2'], newData) comes to me in a function. What would I have to do to return the original object with var.foo2 = new Data...
asked by 06.09.2018 / 10:29
4
answers

Pass HTML select value to PHP with ajax

(ESTO ESTÁ EN UN SCRIPT APARTE EN WORDPRESS, QUE LO RECONOCE PERO GENERA ERROR) (function($){ var d= document.getElementById("lista").value; $.post(document.location.pathname , { variable: d } ); } (jQuery)) <div> <form method="post...
asked by 22.02.2017 / 21:38
3
answers

Change letters of an html with function replace ()

I want to do something similar to what the lacuerda.net page does, where you have a music and you can turn it up or down tonality. I have my test page where I want to change the tone of the music. I've been testing with the function r...
asked by 27.06.2017 / 18:05
1
answer

Unexpected result using string.split ()

Given the following code: function myFunction() { var str = "<tr><td>Prueba 1</td><td>Prueba 1</td><td>Prueba 1</td>td>Prueba 1</td><td>Prueba 1</td><td>Pru...
asked by 20.08.2017 / 22:11
3
answers

How can I send the id along with an event in js

My question is if I can send the id of a tag in html along with the same event that executes it, for example: <button id="boton" onclick="mandarId()"> and when the event happens send the id of the tag too.     
asked by 04.11.2016 / 11:59
2
answers

Get the name of a binary image with base64 when you download it

Suppose I have the following base64 image: <img alt="imagen de prueba" width="16" height="16" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAA……… /> When I run the view in the browser and show the image, at the time of downloa...
asked by 13.01.2016 / 04:30