Questions tagged as 'javascript'

6
answers

Read characters from a text string before a space with Javascript

I need to do the following, and I can not find a suitable way to do it ... This is the code of a function, which puts two tabulations (two spaces with \ t) when finding the first space inside the variable 'customText'. function generatePage...
asked by 28.06.2016 / 10:48
3
answers

Event handler when changing the attribute of a label

Is there an event handler in JavaScript for when the value of an attribute is updated? And more concrete for the case of src of a img . I do not mean load (which is thrown when the image has been loaded), but before, when...
asked by 10.01.2017 / 18:23
2
answers

Problem Stone, Paper, Scissors in JavaScript

We are doing a Paper Rock and Scissor project and we do not achieve several conditions. Explanation of the game: -When we start the page it starts with onload the function countAfter (), while it is activated can not select an option (ston...
asked by 22.05.2018 / 17:53
1
answer

Get the color of an area or specific coordinate of a PNG image or JPG when clicking

I need to get the color of an image in an exact coordinate where the user clicks, I need this to be possible with png, jpg or svg format images.     
asked by 17.10.2018 / 17:46
4
answers

How to traverse a php fix in javascript?

I'm using laravel for a project, I present the following problem, in the controller I have an array called scaling value that is filled, then that array was sent to view using return and compact, in the view I need to pass that array to a script...
asked by 25.04.2018 / 21:52
2
answers

Get CSS attribute in JS

I want to get a property of css in js to add its value. In the following code I have a div called bubble, and what I want is to increase its value in scale (0.1) each time the function is executed and the only way I can think of is to obtain...
asked by 10.10.2018 / 11:54
2
answers

Doubt with createElement ('div') for id

I am developing a portfolio and in the following code you will see that I collect the information from a file .json , until here there is no problem. For those who do not use fetch , I leave the information here. link Code: targetAbo...
asked by 24.06.2016 / 17:30
3
answers

signalr - TypeError: chat is undefined

I am developing a simple chat with signalr and I have run into an error that I still can not solve. It says that the variable chat is not defined which is not true, since I am declaring it. var chat = $.connection.chat...
asked by 06.12.2015 / 18:19
5
answers

Perform 2 different functions in a javascript onclick event

I have a link that works as a button and when I click on it, a div will appear from the outside of the page, which will be positioned above what is in the html in that position. When I press the same button again, I want it to come...
asked by 04.02.2016 / 20:07
5
answers

How to get all the values of an object?

const obj = [{ nombre: "Nombre...", apellidos: "Coo..", edad: 22 }] console.log(Object.values(obj)) let nuw_obj = obj.map(function(p){ console.log(p.nombre) }) I want to access all the values and not their keys //Nombre...Coo..22     
asked by 01.11.2017 / 23:45